-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.version.sh
39 lines (37 loc) · 1.55 KB
/
.version.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
37
38
39
# PREBUMP runs for all kinds of bump
PREBUMP=
# it is usefull to make sure local is in sync with remote
git fetch --tags origin master
git pull origin master
# PREVERSION runs for any kinds of bump, it the last pre-hook
PREVERSION=
# use it to declare tasks that should run for any kind of bump
go vet ./...
go fmt ./...
go run main.go --help
# finalize the changelog
echo "finalizing changelog..."
github_changelog_generator --future-release "!newversion!"
# changelog finalize --version !newversion!
# echo "committing change.log..."
# commit -q -m "Update change log file for !newversion!" -f change.log
# echo "exporting changelog..."
# changelog md -o CHANGELOG.md --vars='{"name":"devopsdays-cli", "user":"devopsdays"}'
echo "committing CHANGELOG.md..."
commit -q -m "Update changelog markdown for !newversion!" -f CHANGELOG.md
echo "finalizing release notes..."
github_changelog_generator --future-release "!newversion!" -o RELEASE_NOTES.md --unreleased-only
echo "committing CHANGELOG.md..."
commit -q -m "Update release notes markdown for !newversion!" -f RELEASE_NOTES.md
echo "installing latest devopsdays-cli"
go install --ldflags "-X github.com./devopsdays/devopsdays-cli/cmd.Version=!newversion!"
echo "generating README.md..."
emd gen -in README.e.md > README.md
echo "committing README.md..."
commit -q -m "Update README for !newversion!" -f README.md
echo "preversion script complete"
# POSTVERSION runs for any kind of bumps
POSTVERSION=
# use it to sync your local to the remote
git push
git push --tags