Skip to content

Commit

Permalink
added workflow step to overwrite names for release testing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Oct 7, 2024
1 parent 66c1ac1 commit 29ac19d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ jobs:
run: |
yarn setup
# This step is only used for testing in the official kangaroo repo
- name: Overwrite Names for release testing
if: ${{ github.repository }} == 'https://github.com/holochain-apps/holochain-kangaroo-electron'
run: |
echo ${{ github.repository }}
echo "overwriting names for release testing"
node ./scripts/overwrite-with-test-name.js
- name: build and upload the app (macOS arm64)
if: matrix.platform == 'macos-latest'
env:
Expand Down
21 changes: 21 additions & 0 deletions scripts/overwrite-with-test-name.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/**
* This script is being used to overwrite the default names in the kangaroo.config.ts to test
* releases in the official kangaroo repo
*/

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

let kangarooConfigString = fs.readFileSync("kangaroo.config.ts", "utf-8");
kangarooConfigString = kangarooConfigString.replace(
"org.holochain.kangaroo-electron",
"org.holochain.kangaroo-electron-test"
);

kangarooConfigString = kangarooConfigString.replace(
"Holochain Kangaroo Electron",
"Holochain Kangaroo Electron (Test)"
);

fs.writeFileSync('kangaroo.config.ts', kangarooConfigString, 'utf-8');

0 comments on commit 29ac19d

Please sign in to comment.