diff options
-rwxr-xr-x | build.bash | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/build.bash b/build.bash deleted file mode 100755 index b7c97d1ec..000000000 --- a/build.bash +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# -# Caddy build script. Automates proper versioning. -# -# Usage: -# -# $ ./build.bash [output_filename] -# -# Outputs compiled program in current directory. -# Default file name is 'ecaddy'. -# -set -e - -output="$1" -if [ -z "$output" ]; then - output="ecaddy" -fi - -pkg=main - -# Timestamp of build -builddate_id=$pkg.buildDate -builddate=`date -u` - -# Current tag, if HEAD is on a tag -tag_id=$pkg.gitTag -set +e -tag=`git describe --exact-match HEAD 2> /dev/null` -set -e - -# Nearest tag on branch -lasttag_id=$pkg.gitNearestTag -lasttag=`git describe --abbrev=0 --tags HEAD` - -# Commit SHA -commit_id=$pkg.gitCommit -commit=`git rev-parse --short HEAD` - -# Summary of uncommited changes -shortstat_id=$pkg.gitShortStat -shortstat=`git diff-index --shortstat HEAD` - -# List of modified files -files_id=$pkg.gitFilesModified -files=`git diff-index --name-only HEAD` - - -go build -ldflags " - -X \"$builddate_id=$builddate\" - -X \"$tag_id=$tag\" - -X \"$lasttag_id=$lasttag\" - -X \"$commit_id=$commit\" - -X \"$shortstat_id=$shortstat\" - -X \"$files_id=$files\" -" -o "$output" |