Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
fixed version:set (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Jul 28, 2021
1 parent 95ae388 commit c3beb62
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
result-encoding: string

- run: npm ci
- run: npm run publish:version ${{ steps.version.outputs.result }}
- run: npm run version:set ${{ steps.version.outputs.result }}

- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
result-encoding: string

- run: npm ci
- run: npm run publish:version ${{ steps.version.outputs.result }}
- run: npm run version:set ${{ steps.version.outputs.result }}
- run: npm run packages:build

- name: Publish Next
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "jest",
"test:watch": "jest --watch",
"test:ci": "jest --ci --coverage --maxWorkers=4",
"publish:version": "lerna version $1 --yes --no-push --no-git-tag-version",
"version:set": "lerna version $1 --yes --no-push --no-git-tag-version",
"packages:build": "lerna run --no-private build",
"packages:publish:next": "lerna exec --no-private -- npm publish --tag next --access public",
"packages:publish:latest": "lerna exec --no-private -- npm publish --tag latest --access public"
Expand Down
4 changes: 2 additions & 2 deletions packages/whale-api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"dist"
],
"scripts": {
"build": "tsc",
"prepack": "node -p \"'export default \\'v' + require('./package.json').version.replace(/\\.\\d+$/, '') + '\\''\" > src/version.ts"
"build": "npm run version.ts && tsc",
"version.ts": "node -p \"'export default \\'v' + require('./package.json').version.replace(/\\.\\d+$/, '') + '\\''\" > src/version.ts"
},
"dependencies": {
"@defichain/jellyfish-api-core": ">=0.30.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/whale-api-client/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
/**
* Automatically set by script: "prepack", automated at CI
*/
export default 'v0.0'

0 comments on commit c3beb62

Please sign in to comment.