Initial Commit

This commit is contained in:
Darren Shepherd
2020-01-24 18:28:38 -07:00
commit 5c2d5a8153
64 changed files with 5234 additions and 0 deletions

27
scripts/version Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
DIRTY="-dirty"
fi
COMMIT=$(git rev-parse --short HEAD)
GIT_TAG=${DRONE_TAG:-$(git tag -l --contains HEAD | head -n 1)}
if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then
VERSION=$GIT_TAG
else
VERSION="${COMMIT}${DIRTY}"
fi
if [ -z "$ARCH" ]; then
ARCH=$(go env GOHOSTARCH)
fi
SUFFIX="-${ARCH}"
TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-ibuildthecloud}
if echo $TAG | grep -q dirty; then
TAG=dev
fi