Skip to content

Commit 196bf63

Browse files
committed
ci: sync cli-with-sentry version with @socketsecurity/cli
Add step to provenance.yml that reads the version from @socketsecurity/cli package.json and updates cli-with-sentry package.json before building. This ensures both packages maintain version parity during publishing.
1 parent 6f2c492 commit 196bf63

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/provenance.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ jobs:
6868
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
6969

7070
# Build and publish '@socketsecurity/cli-with-sentry' package.
71+
- name: Sync @socketsecurity/cli-with-sentry version with @socketsecurity/cli
72+
run: |
73+
CLI_VERSION=$(node -p "require('./packages/cli/package.json').version")
74+
echo "Syncing cli-with-sentry version to $CLI_VERSION"
75+
node -e "
76+
const fs = require('fs');
77+
const pkgPath = './packages/cli-with-sentry/package.json';
78+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
79+
pkg.version = '$CLI_VERSION';
80+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
81+
"
7182
- name: Build @socketsecurity/cli-with-sentry package
7283
run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 INLINED_SOCKET_CLI_SENTRY_BUILD=1 pnpm run build:dist
7384
env:

0 commit comments

Comments
 (0)