1
0
mirror of https://github.com/rancher/cli.git synced 2026-02-05 09:48:36 +01:00

Initial Commit

This commit is contained in:
Darren Shepherd
2016-05-26 20:00:15 -07:00
commit fd5da291c4
44 changed files with 2780 additions and 0 deletions

14
scripts/version Executable file
View File

@@ -0,0 +1,14 @@
#!/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