From 6bf149690408916cf652ad4ba4bbecb61f79fea7 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 12 Jan 2026 16:05:19 +0000 Subject: [PATCH 1/6] fix craft / removed replace-in-file dependencies --- .github/workflows/release.yml | 42 +++++++++++++++++++++-------------- scripts/version-bump.js | 31 ++++++++++++++++---------- 2 files changed, 44 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3cf9736..9ab2d00b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,20 +17,28 @@ jobs: runs-on: ubuntu-latest name: Release a new version steps: - - name: Get auth token - id: token - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 - with: - app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} - private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3 - with: - token: ${{ steps.token.outputs.token }} - fetch-depth: 0 - - name: Prepare release - uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 - env: - GITHUB_TOKEN: ${{ steps.token.outputs.token }} - with: - version: ${{ inputs.version }} - force: ${{ inputs.force }} + - name: Get auth token + id: token + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 + with: + app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + token: ${{ steps.token.outputs.token }} + fetch-depth: 0 + - name: Set up Node + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v5 + - name: Create install action from Craft + run: | + mkdir -p install + curl -sSL https://raw.githubusercontent.com/getsentry/craft/39ee616a6a58dc64797feecb145d66770492b66c/install/action.yml -o install/action.yml + pwd + ls -la install/ + - name: Prepare release + uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ inputs.version }} + force: ${{ inputs.force }} diff --git a/scripts/version-bump.js b/scripts/version-bump.js index e297ec49..083231bc 100644 --- a/scripts/version-bump.js +++ b/scripts/version-bump.js @@ -1,15 +1,22 @@ -const replace = require('replace-in-file'); +const fs = require('fs'); +const path = require('path'); const pjson = require('../package.json'); -replace({ - files: ['src/version.ts'], - from: /\d+\.\d+.\d+(?:-\w+(?:\.\w+)?)?/g, - to: pjson.version, -}) - .then((changedFiles) => { - console.log('Modified files:', changedFiles.join(', ')); - }) - .catch((error) => { - console.error('Error occurred:', error); - }); +const versionFile = path.join(__dirname, '../src/version.ts'); + +try { + let content = fs.readFileSync(versionFile, 'utf8'); + const versionRegex = /\d+\.\d+.\d+(?:-\w+(?:\.\w+)?)?/g; + const newContent = content.replace(versionRegex, pjson.version); + + if (content !== newContent) { + fs.writeFileSync(versionFile, newContent, 'utf8'); + console.log('Modified files: src/version.ts'); + } else { + console.log('No changes needed in src/version.ts'); + } +} catch (error) { + console.error('Error occurred:', error); + process.exit(1); +} From 1ccf4bd870dd573bde361430eb8ba219ce5ef792 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 12 Jan 2026 16:06:28 +0000 Subject: [PATCH 2/6] remove pkg ref --- package.json | 1 - yarn.lock | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index ab6ea48d..3648b697 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "jest-extended": "^4.0.2", "prettier": "^3.3.2", "prettier-plugin-java": "^2.6.0", - "replace-in-file": "^6.2.0", "rimraf": "^5.0.1", "swiftlint": "^2.0.0", "ts-jest": "^29.1.1", diff --git a/yarn.lock b/yarn.lock index 38875ba6..b7573997 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2803,7 +2803,7 @@ glob@^10.3.7: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4320,15 +4320,6 @@ regextras@^0.7.1: resolved "https://registry.yarnpkg.com/regextras/-/regextras-0.7.1.tgz#be95719d5f43f9ef0b9fa07ad89b7c606995a3b2" integrity sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w== -replace-in-file@^6.2.0: - version "6.3.5" - resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-6.3.5.tgz#ff956b0ab5bc96613207d603d197cd209400a654" - integrity sha512-arB9d3ENdKva2fxRnSjwBEXfK1npgyci7ZZuwysgAp7ORjHSyxz6oqIjTEv8R0Ydl4Ll7uOAZXL4vbkhGIizCg== - dependencies: - chalk "^4.1.2" - glob "^7.2.0" - yargs "^17.2.1" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -5156,7 +5147,7 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.2.1, yargs@^17.3.1, yargs@^17.7.2: +yargs@^17.3.1, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 11e9bb75eab8d7cbc4fee7725f73f1d815c94fdc Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 12 Jan 2026 16:07:42 +0000 Subject: [PATCH 3/6] remove node setup step --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ab2d00b..4dfeb30c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,8 +27,6 @@ jobs: with: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - - name: Set up Node - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v5 - name: Create install action from Craft run: | mkdir -p install From 0c947578817761f7ad63566b2f14cd58d95930f9 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Mon, 12 Jan 2026 16:28:01 +0000 Subject: [PATCH 4/6] Update .github/workflows/release.yml --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dfeb30c..c80c98b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,8 +31,6 @@ jobs: run: | mkdir -p install curl -sSL https://raw.githubusercontent.com/getsentry/craft/39ee616a6a58dc64797feecb145d66770492b66c/install/action.yml -o install/action.yml - pwd - ls -la install/ - name: Prepare release uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 env: From 5bf116b85553c4ffafa6487b473c61ffc662ced9 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Tue, 13 Jan 2026 10:16:42 +0000 Subject: [PATCH 5/6] Update .github/workflows/release.yml --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c80c98b8..1d55bc18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,12 +27,8 @@ jobs: with: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - - name: Create install action from Craft - run: | - mkdir -p install - curl -sSL https://raw.githubusercontent.com/getsentry/craft/39ee616a6a58dc64797feecb145d66770492b66c/install/action.yml -o install/action.yml - name: Prepare release - uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2 + uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce# v2 env: GITHUB_TOKEN: ${{ steps.token.outputs.token }} with: From 5aa6b9fc9593ee3151d27afb998406e0e389938d Mon Sep 17 00:00:00 2001 From: LucasZF Date: Tue, 13 Jan 2026 10:28:21 +0000 Subject: [PATCH 6/6] Update .github/workflows/release.yml --- .github/workflows/release.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d55bc18..fbcac1db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,20 +17,20 @@ jobs: runs-on: ubuntu-latest name: Release a new version steps: - - name: Get auth token - id: token - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 - with: - app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} - private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - token: ${{ steps.token.outputs.token }} - fetch-depth: 0 - - name: Prepare release - uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce# v2 - env: - GITHUB_TOKEN: ${{ steps.token.outputs.token }} - with: - version: ${{ inputs.version }} - force: ${{ inputs.force }} + - name: Get auth token + id: token + uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 + with: + app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + token: ${{ steps.token.outputs.token }} + fetch-depth: 0 + - name: Prepare release + uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ inputs.version }} + force: ${{ inputs.force }}