Versioning the Project
How to Change the Version of the Project
To update the project version, run the following command. This process will update the necessary files, including Jenkinsfile, lerna.json, eas.json and values-dev.yaml, based on the provided version. For instance, to change from v9 to v9.1:
Run
cd tools
node deployVersionUpdate.js v9.1
git checkout -b develop9-1
git add .
git commit -m 'prep for version 9.1'
Jenkinsfile
The Jenkinsfile will be updated with the new version in branch names and variables.Example:
@@ -13,17 +13,17 @@ pipeline {
- string(name: 'VERSION', defaultValue: 'v9', description: 'version of the deployment', trim: true)
+ string(name: 'VERSION', defaultValue: 'v9-1', description: 'version of the deployment', trim: true)
string(name: 'HEMERA_LOG_LEVEL', defaultValue: 'info', description: 'log level for hemera')
string(name: 'LOG_LEVEL', defaultValue: 'info', description: 'log level')
string(name: 'DEPLOYMENT_PATH', defaultValue: '/servers', description: 'folder path to load helm charts')
- string(name: 'PUBLISH_BRANCH', defaultValue: 'devpublish', description: 'the publish branch for packages release')
+ string(name: 'PUBLISH_BRANCH', defaultValue: 'devpublish9-1', description: 'the publish branch for packages release')
....
- string(name: 'REPOSITORY_BRANCH', defaultValue: 'develop', description: 'the branch with changes')
- string(name: 'DEVELOP_BRANCH', defaultValue: 'develop', description: 'the branch for the development')
+ string(name: 'REPOSITORY_BRANCH', defaultValue: 'develop9-1', description: 'the branch with changes')
+ string(name: 'DEVELOP_BRANCH', defaultValue: 'develop9-1', description: 'the branch for the development')
string(name: 'MASTER_BRANCH', defaultValue: 'master', description: 'Master branch as default branch for production.')
lerna.json
lerna.jsonwill be updated with the new version and appropriate branch names underallowBranch.Example:
@@ -17,7 +17,8 @@
"devpublish7",
"devpublish8",
"devpublish9",
- "devpublish9"
+ "devpublish9",
+ "devpublish9-1"
],
"message": "chore(release): publish",
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**", "**/*.md", "**/example/**"]
@@ -38,7 +39,9 @@
"devpublish8",
"devpublish9",
"devpublish9",
- "develop9"
+ "develop9",
+ "devpublish9-1",
+ "develop9-1"
],
"private": true,
"conventionalCommits": true,
@@ -48,5 +51,5 @@
"npmClient": "yarn",
"useNx": true,
"packages": ["packages-modules/**", "packages/**", "servers/*", "portable-devices/*"],
- "version": "9.0.3"
+ "version": "9.1.0"
}
portable-devices/mobile/eas.json This file will update the
GRAPHQL_URLand/orCLIENT_URLfields.Example:
- \"GRAPHQL_URL\": \"https://ideback.example-namespace-v1.cdebase.io/graphql\",
+ \"GRAPHQL_URL\": \"https://idefront.example-namespace-v9-1.cdebase.io/graphql\",
values-dev.yaml
This file will update theVERSION,CONNECTION_ID, andCLIENT_URLfields.Example:
frontend:
env:
AUTH0_TOKEN_GRANTED_TIME: "2592000000"
- CLIENT_URL: "https://idefront.example-namespace-v9.cdebase.dev"
+ CLIENT_URL: "https://idefront.example-namespace-v9-1.cdebase.dev"
STRIPE_PUBLISHABLE_KEY: ""
...
env:
GA_ID: "GXXXXXX"
- CONNECTION_ID: v9
+ CONNECTION_ID: v9.1
CONFIG_PATH: "/tmp"
....
- CLIENT_URL: "https://idefront.example-namespace-v9.cdebase.dev"
- VERSION: v9
+ CLIENT_URL: "https://idefront.example-namespace-v9-1.cdebase.dev"
+ VERSION: v9-1
external:
Scripts
The versioning command deployVersionUpdate.js sequentially calls these scripts:
- updateJenkinsfileVersion.js: Updates
Jenkinsfilewith the new version in branches and environment variables【14†source】. - updateLernaVersion.js: Adjusts
lerna.jsonto reflect the new version and branch configurations【15†source】. - updateYamlSettings.js: Updates
values-dev.yamlby modifying fields likeVERSION,CONNECTION_ID, andCLIENT_URL【16†source】.