Skip to content

Commit

Permalink
chore: move version-manager.ts to .github (#3983)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMehl committed Feb 28, 2025
1 parent af6c554 commit 0971c97
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
id: version
run: |
set -e # Exit immediately if a command exits with a non-zero status
NEW_VERSION=$(bun script/version-manager.ts update-version ${{ inputs.repository }} ${{ inputs.version_type }})
NEW_VERSION=$(bun .github/workflows/scripts/version-manager.ts update-version ${{ inputs.repository }} ${{ inputs.version_type }})
if [ $? -ne 0 ]; then
echo "::error::Version manager failed"
exit 1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
build:
if: |
(github.event_name == 'workflow_dispatch') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release') &&
startsWith(github.event.pull_request.head.ref, 'release/ana-'))
name: Build
Expand Down Expand Up @@ -106,8 +106,8 @@ jobs:
# Debug: List files
echo "Contents of distributions directory:"
ls -la analysis/build/distributions/
CHANGELOG_CONTENT=$(bun script/version-manager.ts extract-changelog analysis ${{ needs.build.outputs.version }})
CHANGELOG_CONTENT=$(bun .github/workflows/scripts/version-manager.ts extract-changelog analysis ${{ needs.build.outputs.version }})
gh release create "ana-${{ needs.build.outputs.version }}" \
--title "Analysis release ${{ needs.build.outputs.version }}" \
--notes "$CHANGELOG_CONTENT" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-visualization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
echo "Contents of packages directory:"
ls -la visualization/dist/packages/
CHANGELOG_CONTENT=$(bun script/version-manager.ts extract-changelog visualization ${{ needs.build.outputs.version }})
CHANGELOG_CONTENT=$(bun .github/workflows/scripts/version-manager.ts extract-changelog visualization ${{ needs.build.outputs.version }})
gh release create "vis-${{ needs.build.outputs.version }}" \
--title "Visualization release ${{ needs.build.outputs.version }}" \
--notes "$CHANGELOG_CONTENT" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ if (import.meta.main) {
switch (command) {
case "extract-changelog":
if (args.length === 0 || args.length > 2) {
console.error("Usage: bun script/version-manager.ts extract-changelog <repository> [version]")
console.error("Usage: bun .github/workflows/scripts/version-manager.ts extract-changelog <repository> [version]")
process.exit(1)
}
process.stdout.write(manager.extractChangelog(args[0], args[1]))
break

case "update-version":
if (args.length !== 2) {
console.error("Usage: bun script/version-manager.ts update-version <repository> <version-type>")
console.error("Usage: bun .github/workflows/scripts/version-manager.ts update-version <repository> <version-type>")
process.exit(1)
}
process.stdout.write(manager.updateVersion(args[0], args[1]))
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The unpublish workflow (`unpublish-release.yml`) provides options to:

## Version Manager

The version manager script (`version-manager.ts`) handles:
The version manager script ([version-manager.ts](.github/workflows/scripts/version-manager.ts)) handles:
- Version updates
- Changelog management
- Release post creation
Expand Down

0 comments on commit 0971c97

Please sign in to comment.