Skip to content

Commit 286004e

Browse files
authored
SWIFT-937 Add a release script (#42)
1 parent 4efdbd5 commit 286004e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

etc/release.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# usage: ./etc/release.sh [new version string]
4+
5+
# exit if any command fails
6+
set -e
7+
8+
# ensure we are on master before releasing
9+
git checkout master
10+
11+
version=${1}
12+
# Ensure version is non-empty
13+
[ ! -z "${version}" ] || { echo "ERROR: Missing version string"; exit 1; }
14+
15+
# regenerate documentation with new version string
16+
./etc/generate-docs.sh ${version}
17+
18+
# tag release and push tag
19+
git tag "v${version}"
20+
git push --tags
21+
22+
# go to GitHub to publish release notes
23+
open "https://github.com/mongodb/swift-bson/releases/tag/v${version}"

0 commit comments

Comments
 (0)