From d23729d9c3e4c9ff06812422d4ddd4a51c7d9762 Mon Sep 17 00:00:00 2001 From: Collins Date: Tue, 23 Jul 2024 13:17:20 +0300 Subject: [PATCH] chore: remove the pre* defined scripts (#493) * Add the missing package.json script * Remove the prerelease script and commands as we don't want them to be run during stable release --- .github/workflows/publish-snapshot.yml | 4 ++-- .github/workflows/version-snapshot.yml | 2 +- package.json | 4 ++-- scripts/{prerelease.js => snapshot.js} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{prerelease.js => snapshot.js} (89%) diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index e4b7d1f6..63d48f08 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -86,9 +86,9 @@ jobs: uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7 with: setupGitUser: false - version: pnpm ci:prerelease + version: pnpm ci:snapshot title: "ci: Update the version packages" - publish: pnpm prerelease + publish: pnpm snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/version-snapshot.yml b/.github/workflows/version-snapshot.yml index 2d549f89..fbef0d82 100644 --- a/.github/workflows/version-snapshot.yml +++ b/.github/workflows/version-snapshot.yml @@ -39,7 +39,7 @@ jobs: uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7 with: setupGitUser: false - version: pnpm ci:prerelease + version: pnpm ci:snapshot title: "ci: update the version packages" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 4d8a3e52..4be4c6ae 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "nx-build-test-skip-cache": "pnpm run build-test --skip-nx-cache", "nx-test-skip-cache": "pnpm run test --skip-nx-cache", "ci:version": "pnpm changeset version", - "ci:prerelease": "pnpm changeset version --snapshot rc-snapshot", + "ci:snapshot": "pnpm changeset version --snapshot rc-snapshot", "sort:networks": "node hack/sortNetworks.js && prettier -u -w packages/base/src/utils/network*.ts", "build": "nx run-many -t build --parallel=1", "build-test": "nx run-many -t style,build,test --projects=@openzeppelin/defender-base-client,* --parallel=false", @@ -48,7 +48,7 @@ "style": "pnpm lint:fix", "skip-lib-ignore": "./hack/skip-lib-ignore.sh", "release": "node ./scripts/release.js", - "prerelease": "node ./scripts/prerelease.js", + "snapshot": "node ./scripts/snapshot.js", "install-pnpm": "npm install -g pnpm" }, "repository": { diff --git a/scripts/prerelease.js b/scripts/snapshot.js similarity index 89% rename from scripts/prerelease.js rename to scripts/snapshot.js index b689c218..48eadde2 100644 --- a/scripts/prerelease.js +++ b/scripts/snapshot.js @@ -22,5 +22,5 @@ process.chdir(path.join(__dirname, '..')); throw new Error(`git ls-remote exited with ${exitCode}:\n${stderr}`); } - await exec('changeset', ['publish', '--tag', 'rc-snapshot']); + await exec('changeset', ['publish', '--no-git-tag', '--tag', 'rc-snapshot']); })();