Skip to content

Commit

Permalink
zflist-publish: support tag and crosstag
Browse files Browse the repository at this point in the history
  • Loading branch information
maxux committed Sep 26, 2023
1 parent eb4e9c6 commit 950bf49
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/zflist-publish
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,33 @@ if [ "$action" == "MERGE" ]; then
zflist hub merge $filename $targetname
fi

if [ "$action" == "CROSSTAG" ]; then
repository=$(echo $targetname | awk -F/ '{ print $1 }')
tagname=$(echo $targetname | awk -F/ '{ print $2 }')

echo "Cross-tagging $filename -> $repository/tags/$tagname"
zflist hub crosstag $filename $repository $tagname
fi

if [ "$action" == "TAG" ]; then
tagname=$(echo $filename | awk -F/ '{ print $1 }')
linkname=$(echo $filename | awk -F/ '{ print $2 }')

repository=$(echo $targetname | awk -F/ '{ print $1 }')
target=$(echo $targetname | awk -F/ '{ print $2 }')

echo "Tagging $repository/$target tag '$tagname' as '$linkname'"
zflist hub tag $tagname $linkname $repository $target
fi

if [ "$action" == "UNTAG" ]; then
tagname=$(echo $filename | awk -F/ '{ print $1 }')
linkname=$(echo $filename | awk -F/ '{ print $2 }')

repository=$(echo $targetname | awk -F/ '{ print $1 }')
target=$(echo $targetname | awk -F/ '{ print $2 }')

echo "Untagging $repository/$target tag '$tagname' as '$linkname'"
zflist hub untag $tagname $linkname $repository $target
fi

0 comments on commit 950bf49

Please sign in to comment.