Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2
uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 19 additions & 12 deletions scripts/version-bump.js
Original file line number Diff line number Diff line change
@@ -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);
}
13 changes: 2 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down
Loading