Skip to content

Commit af04789

Browse files
authored
Update, don't upsert, snapshot version (#390)
Previously it would insert it even in packages that don't include that package
1 parent 6420002 commit af04789

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
retention-days: 1
5050
if-no-files-found: error
5151

52-
5352
- name: Publish snapshot
5453
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
5554
env:
@@ -62,9 +61,14 @@ jobs:
6261
# see https://github.com/npm/cli/pull/4588
6362
VERSION="0.0.0-SNAPSHOT-$(date '+%Y%m%d%H%M%S')"
6463
npm --workspaces version $VERSION --no-git-tag-version --no-workspaces-update
65-
npm --workspaces pkg set "dependencies.@restatedev/restate-sdk-core=$VERSION"
66-
npm --workspaces pkg set "dependencies.@restatedev/restate-sdk=$VERSION"
67-
npm --workspaces pkg set "dependencies.@restatedev/restate-sdk-clients=$VERSION"
64+
set() {
65+
npm --workspaces pkg get "dependencies.$1" |
66+
jq -r 'with_entries(select(.value != {})) | keys[]' |
67+
xargs -I% npm --workspace % pkg set "dependencies.$1=$VERSION"
68+
}
69+
set "@restatedev/restate-sdk-core"
70+
set "@restatedev/restate-sdk"
71+
set "@restatedev/restate-sdk-clients"
6872
npm --workspaces update
6973
# We use dist-tag dev for the snapshot releases, see https://docs.npmjs.com/cli/v9/commands/npm-dist-tag for more info
7074
# A snapshot MUST not be published with latest tag (omitting --tag defaults to latest) to avoid users to install snapshot releases

0 commit comments

Comments
 (0)