forked from dekorateio/dekorate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·36 lines (30 loc) · 1.13 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#
# Script requires `grab`. To install it:
# curl -s https://raw.githubusercontent.com/shellib/grab/master/install.sh | bash
#
source $(grab github.com/shellib/cli)
source $(grab github.com/shellib/maven as maven)
release_version=$(readopt --release-version $*)
if [ -z $release_version ]; then
echo "Option --release_version is required!"
exit 1
fi
function set_version() {
local file=$1
./scripts/ChangeVersion.java ${file} io.dekorate $release_version > ${file}.versionChanged
mv ${file}.versionChanged ${file}
git add ${file}
}
# Update the docs with the release version
set_version readme.md io.dekorate $release_version
set_version site/getting-started/index.md io.dekorate $release_version
set_version site/kubernetes/index.md io.dekorate $release_version
set_version site/openshift/index.md io.dekorate $release_version
git commit -m "doc: Update dekorate version in docs to $release_version"
mvn versions:set -DnewVersion=$release_version -Pwith-examples
git add examples
git commit -m "chore: Set examples version to $release_version"
git stash save --keep-index --include-untracked
git stash drop
maven::release $*