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
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The steps for creating a `vX.Y.Z-rel` branch are:

1. Update `EDITORS.md` on `main`
2. Merge `main` into `dev` and `dev` into `vX.Y-dev` via PRs
- Sync PRs are automatically created by workflows `sync-main-to-dev` and `sync-dev-to-vX.Y-dev`
- sync PRs are automatically created by workflows `sync-main-to-dev` and `sync-dev-to-vX.Y-dev`
3. Prepare spec files in `vX.Y-dev`
- `npm run format-markdown`
- `npm run build-src`
Expand All @@ -211,6 +211,7 @@ The steps for creating a `vX.Y.Z-rel` branch are:
- copy `EDITORS.md` to `versions/X.Y.Z-editors.md`
- delete `src/schemas`
- delete `tests/schema`
- bash script `scripts/adjust-release-branch.sh` performs these steps
5. Merge `vX.Y.Z-rel` into `main` via PR
- this PR should only add files `versions/X.Y.Z.md` and `versions/X.Y.Z-editors.md`

Expand Down
21 changes: 21 additions & 0 deletions scripts/adjust-release-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Author: @ralfhandl

# Run this script from the root of the repo. It is designed to be run manually in a release branch.

branch=$(git branch --show-current)

if [[ ! $branch =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rel$ ]]; then
echo "This script is intended to be run from a release branch, e.g. v3.1.2-rel"
exit 1
fi

vVersion=$(basename "$branch" "-rel")
version=${vVersion:1}
echo Prepare release of $version

cp EDITORS.md versions/$version-editors.md
mv src/oas.md versions/$version.md
rm -r src/schemas
rm -r tests/schema