Last change
on this file since 53 was 50, checked in by prologic, 4 years ago |
Add release script
|
-
Property svn:executable
set to
on
|
File size:
511 bytes
|
Rev | Line | |
---|
[50] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | # Get the highest tag number
|
---|
| 4 | VERSION="$(git describe --abbrev=0 --tags)"
|
---|
| 5 | VERSION=${VERSION:-'0.0.0'}
|
---|
| 6 |
|
---|
| 7 | # Get number parts
|
---|
| 8 | MAJOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
---|
| 9 | MINOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
---|
| 10 | PATCH="${VERSION%%.*}"; VERSION="${VERSION#*.}"
|
---|
| 11 |
|
---|
| 12 | # Increase version
|
---|
| 13 | PATCH=$((PATCH+1))
|
---|
| 14 |
|
---|
| 15 | TAG="${1}"
|
---|
| 16 |
|
---|
| 17 | if [ "${TAG}" = "" ]; then
|
---|
| 18 | TAG="${MAJOR}.${MINOR}.${PATCH}"
|
---|
| 19 | fi
|
---|
| 20 |
|
---|
| 21 | echo "Releasing ${TAG} ..."
|
---|
| 22 |
|
---|
| 23 | git tag -a -s -m "Release ${TAG}" "${TAG}"
|
---|
| 24 | git push --tags
|
---|
| 25 | goreleaser release --rm-dist
|
---|
Note:
See
TracBrowser
for help on using the repository browser.