Skip to content

Commit

Permalink
Pull in latest version of run-script-framework
Browse files Browse the repository at this point in the history
  • Loading branch information
pronovic committed Jan 2, 2025
1 parent 517dc40 commit 1e453fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .run/commands/tagrelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ command_tagrelease() {
COPYRIGHT="${EARLIEST_YEAR}-${LATEST_YEAR}"
fi

DEFAULT_BRANCH=$(default_branch)
CURRENT_BRANCH=$(current_branch)
DEFAULT_BRANCH=$(run_command defaultbranch)
CURRENT_BRANCH=$(run_command currentbranch)
if [ "$CURRENT_BRANCH" != "$DEFAULT_BRANCH" ]; then
echo "*** You are not on $DEFAULT_BRANCH; you cannot release from this branch"
exit 1
Expand Down
14 changes: 0 additions & 14 deletions .run/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ task_help() {
fi
}

# Return the default Git branch
default_branch() {
# There is no canonical way to determine the default Git branch. This version is
# slow, but seems more reliable than most. At least by pulling it into a function
# (vs. a variable) only the commands or tasks that need it will take the hit.
# See: https://stackoverflow.com/questions/28666357/how-to-get-default-git-branch
LC_ALL=C git remote show $(git remote) | grep 'HEAD branch' | cut -d' ' -f5
}

# Return the current Git branch
current_branch() {
git branch -a | grep '^\*' | sed 's/^\* //'
}

# Setup the runtime environment
setup_environment() {
local EARLIEST_YEAR LATEST_YEAR
Expand Down

0 comments on commit 1e453fc

Please sign in to comment.