Skip to content

Commit 6db3ade

Browse files
committed
Update release script
1 parent c3f9c3d commit 6db3ade

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

bin/release.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -o errexit
5+
set -o pipefail
6+
set -o nounset
7+
8+
BASE_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd)"
9+
10+
NEW_VERSION=$1
11+
12+
LATEST_VERSION=$(jq -r '.http4k.version' "$BASE_DIR/version.json")
13+
14+
git stash
15+
16+
cd $BASE_DIR
17+
18+
echo Upgrade from "$LATEST_VERSION" to "$NEW_VERSION"
19+
20+
find . -name "*.md" | grep -v "CHANGELOG" | xargs -I '{}' sed -i '' s/"$LATEST_VERSION"/"$NEW_VERSION"/g '{}'
21+
sed -i '' s/"$LATEST_VERSION"/"$NEW_VERSION"/g version.json
22+
23+
git commit -am"Release $NEW_VERSION"
24+
25+
git push
26+
27+
git stash apply

0 commit comments

Comments
 (0)