#!/usr/bin/env sh ######################################################################### # @author : kyle (kyle@imap.cc) # # @file : is-current-tag.sh # # @created : Wednesday Oct 18, 2023 18:36:55 PDT # # # # @description : determines if the current git commit is a tagged # # commit. # # # # This is used for determining whether this is a current release, and # # build artifacts should be generated. # ######################################################################### if [ ! -z "$(git status -s)" ] then echo "[-] work tree is dirty - not proceeding." exit 0 fi if [ -z "$(git tag --contains $(git rev-parse --verify HEAD))" ] then echo "[-] current HEAD isn't tagged." exit 0 fi # we are in a tagged commit