Skip to content

Commit

Permalink
Makes arg parsing more verbose
Browse files Browse the repository at this point in the history
Thesting #@does @it @work?
  • Loading branch information
holm10 committed Jan 10, 2025
1 parent bbe2169 commit e7c1693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/wheeltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ jobs:
# Get your last commit message, not the merge commit.
text=$(git log -1 --no-merges --pretty=%B)
# Read the commit message into an array split by "#".
echo $(echo $text|tr -d '\n')
echo $(awk -F'#' '{ for(i=1;i<=NF;i++) print $i }' <<< $(echo $text|tr -d '\n'))
echo $(awk 'NR==2' <<< $(awk -F'#' '{ for(i=1;i<=NF;i++) print $i }' <<< $(echo $text|tr -d '\n')))
declare commit_args=$(awk 'NR==2' <<< $(awk -F'#' '{ for(i=1;i<=NF;i++) print $i }' <<< $(echo $text|tr -d '\n')))
# Sanity check.
echo "the tags are: ${commit_args}"
# Add tags and overwrite "checking" variable to true if there are tags.
if [[ "${commit_args[1]}" == *"@"* ]]; then
if [[ "${commit_args}" == *"@"* ]]; then
echo "has_tags=true" >> $GITHUB_ENV
echo "spec_tags=${commit_args}" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit e7c1693

Please sign in to comment.