File: release.sh

package info (click to toggle)
gitlab-workhorse 7.6.0%2Bdebian-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,440 kB
  • sloc: makefile: 233; sh: 161; python: 15
file content (31 lines) | stat: -rw-r--r-- 608 bytes parent folder | download
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
set -e

remotes='https://gitlab.com/gitlab-org/gitlab-workhorse.git'

main() {
  get_version
  tag_name="v${version}"
  git tag -m "Version ${version}" -a ${tag_name}
  git show ${tag_name}
  echo
  echo "Does this look OK? Enter 'yes' to push to ${remotes}"
  read confirmation
  if [ "x${confirmation}" != xyes ] ; then
    echo "Aborting"
    exit 1
  fi
  for r in ${remotes}; do
    git push "${r}" HEAD ${tag_name}
  done
}

get_version() {
  v=$(sed 1q VERSION)
  if ! echo "${v}" | grep -q '^[0-9]\+\.[0-9]\+\.[0-9]\+$' ; then
    echo "Invalid VERSION: ${v}"
    exit 1
  fi
  version="${v}"
}

main