1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-16 15:21:33 +00:00

Initial Commit

This commit is contained in:
Darren Shepherd
2017-10-11 22:48:07 -07:00
commit 6623dd7352
54 changed files with 6626 additions and 0 deletions

18
scripts/version Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
DIRTY="-dirty"
fi
COMMIT=$(git rev-parse --short HEAD)
GIT_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=amd64
fi