File: set-version.sh

package info (click to toggle)
golang-github-canonical-candid 1.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,016 kB
  • sloc: python: 1,903; sh: 235; makefile: 81
file content (16 lines) | stat: -rwxr-xr-x 301 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# set-version.sh
# Set the version built into the application.

set -e

if [ -z "${GIT_COMMIT}" ]; then
	exit 0
fi

if [ -z "${VERSION}" ]; then
	exit 0
fi

gofmt -r "unknownVersion -> Version{GitCommit: \"${GIT_COMMIT}\", Version: \"${VERSION}\",}" version/init.go.tmpl > version/init.go