source: code/trunk/tools/release.sh@ 53

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
Line 
1#!/bin/sh
2
3# Get the highest tag number
4VERSION="$(git describe --abbrev=0 --tags)"
5VERSION=${VERSION:-'0.0.0'}
6
7# Get number parts
8MAJOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
9MINOR="${VERSION%%.*}"; VERSION="${VERSION#*.}"
10PATCH="${VERSION%%.*}"; VERSION="${VERSION#*.}"
11
12# Increase version
13PATCH=$((PATCH+1))
14
15TAG="${1}"
16
17if [ "${TAG}" = "" ]; then
18 TAG="${MAJOR}.${MINOR}.${PATCH}"
19fi
20
21echo "Releasing ${TAG} ..."
22
23git tag -a -s -m "Release ${TAG}" "${TAG}"
24git push --tags
25goreleaser release --rm-dist
Note: See TracBrowser for help on using the repository browser.