1.0.0 • Published 2 years ago

myproximus-ts v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Getting started

To setup the project run the following commands

  • yarn install
  • yarn build

Develop

Open 2 terminals, one for each of the following commands:

  1. yarn watch:build
  2. yarn watch:test

Add a new script

  1. Place the new script in the scripts folder
  2. Edit the file cli.ts and add the command that will invoke the script

Debug

Add one or more of the following flags to enable certain features (ex DEBUG=1 node bin/myproximus-ts wait-and-exit 3)

  • DEBUG=1 to enable debug logs
  • DEBUG_NETWORK=1 to enable network debug logs
  • SIMULATE_CI=1 to enable some ENV VARS mostly used for testing while developing (🚨 be careful!)

Lint, Coverage, Test...

  • yarn fix to run the linter and automatically fix your code
  • yarn cov to generate and open the project coverage
  • yarn test to run the unit tests
  • yarn doc to generate and open the documentation

Available scripts

For a list of available scripts and their usage run the command: node bin/myproximus-ts --help

  1. wait-and-exit <seconds> <exitcode>

    Wait an amount of seconds (3 default) and exit the process with the given exit code (0 default)

  2. cancel-prev-bitrise-builds

    Query Bitrise for the all active builds for the given GIT_BRANCH and abort all the builds

  3. cancel-prev-gitlab-pipelines

    Query Bitrise for the all active pipelines and cancel all the pipelines that are in pending or running state

  4. fetch-translations <appVersion>

    Download and store the translation from the Proximus's Magnolia CMS. For each app (myproximus and epic), download the supported languages (EN, FR, NL) and store the content in /src-dise/common-features/translations/<app>/<language.json>. Commit and push the changes on the develop/$APP_VERSION branch

  5. promote-app-version

    Perform a sequence of merges/commits for the given $APP_VERSION
    merge develop/$APP_VERSION into uat/$APP_VERSION
    merge uat/$APP_VERSION into prodlike/$APP_VERSION
    merge prodlike/$APP_VERSION into lut/$APP_VERSION
    merge lut/$APP_VERSION into master/$APP_VERSION