1
0
mirror of https://github.com/rancher/cli.git synced 2026-02-05 18:48:50 +01:00
Files
cli/scripts/version
Enrico Candino 192a95e4ed [v2.9] Migrate from Drone to Github Actions, remove Dapper and add Darwin/arm64 support (#362)
* enabled gofmt linter, added lint scripts, removed dapper from Makefile

* added build (with arm64 support), package steps, and fossa job

* github tag, and envs

* upload assets

* removed dapper and google cloud storage

* moved checkout steps

* removed drone.yml

* requested changes

- removed extra Test step
- added check for run on PRs
- added FOSSA check on release

* moved fossa in its own workflow

* remove manual trigger and tag check on release
2024-05-06 12:31:58 +02:00

15 lines
309 B
Bash
Executable File

#!/bin/bash
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
DIRTY="-dirty"
fi
COMMIT=$(git rev-parse --short HEAD)
GIT_TAG=${GITHUB_TAG:-$(git tag -l --contains HEAD | head -n 1)}
if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then
VERSION=$GIT_TAG
else
VERSION="${COMMIT}${DIRTY}"
fi