#!/bin/bash has_changes=$(git status --short) head_sha=$(git rev-parse --short HEAD) tag=$head_sha if [[ -n $has_changes ]]; then tag="$tag-dev" fi echo "$tag"