Skip to content

Commit

Permalink
KKERTI test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkerti committed Aug 3, 2023
1 parent 2f7a3a5 commit 049358e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/alpha-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "${{ env.BRANCH_NAME }}"
echo "RELEASE_CHANNEL=alpha" >> $GITHUB_ENV
- name: Update package.json
run: node ./build-scripts/nightly-packageModifier.js
run: node ./build-scripts/alpha-packageModifier.js

- name: Install dependencies
run: npm i
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/nightly-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
shell: bash
run: |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "${{ env.BRANCH_NAME }}"
echo "RELEASE_CHANNEL=alpha" >> $GITHUB_ENV
- name: Update package.json
run: node ./build-scripts/nightly-packageModifier.js
Expand Down
18 changes: 18 additions & 0 deletions build-scripts/alpha-packageModifier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// File: build-scripts/updatePackageJson.js

const fs = require("fs");
const path = require("path");

let packageJsonPath = path.join(__dirname, "../package.json");
let packageJson = require(packageJsonPath);

let branchName = process.env.BRANCH_NAME;
let releaseVersion = process.env.RELEASE_VERSION;

packageJson.build.productName += ` (Alpha)`;
packageJson.version = `${releaseVersion}`;

fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), (err) => {
if (err) throw err;
console.log("package.json has been updated!");
});
4 changes: 1 addition & 3 deletions build-scripts/nightly-packageModifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ let packageJsonPath = path.join(__dirname, "../package.json");
let packageJson = require(packageJsonPath);

let branchName = process.env.BRANCH_NAME;
let releaseChannel = process.env.RELEASE_CHANNEL;

packageJson.build.productName += `(Nightly) -${branchName}`;
packageJson.version += `-${releaseChannel}`;
packageJson.build.productName += ` (Nightly) ${branchName}`;

fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), (err) => {
if (err) throw err;
Expand Down

0 comments on commit 049358e

Please sign in to comment.