Skip to content

Commit 51b775f

Browse files
committed
Merge remote-tracking branch 'origin/main-adjust-release-branch' into v3.9.9-rel
2 parents 0da8496 + b1f703f commit 51b775f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ The steps for creating a `vX.Y.Z-rel` branch are:
199199

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

scripts/adjust-release-branch.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# Author: @ralfhandl
4+
5+
# Run this script from the root of the repo. It is designed to be run manually in a release branch.
6+
7+
branch=$(git branch --show-current)
8+
9+
if [[ ! $branch =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rel$ ]]; then
10+
echo "This script is intended to be run from a release branch, e.g. v3.1.2-rel"
11+
exit 1
12+
fi
13+
14+
vVersion=$(basename "$branch" "-rel")
15+
version=${vVersion:1}
16+
echo Prepare release of $version
17+
18+
cp EDITORS.md versions/$version-editors.md
19+
mv src/oas.md versions/$version.md
20+
rm -r src/schemas
21+
rm -r tests/schema

0 commit comments

Comments
 (0)