Use comm instead of uniq to compute missing tags

This commit is contained in:
Antoine Martin 2024-10-18 11:01:17 +00:00
parent 020a43fd90
commit 5266539427

View file

@ -24,9 +24,9 @@ jobs:
token: ${{ secrets.CODE_FORGEJO_TOKEN }}
- name: Missing tag detecting
run: |
git ls-remote $upstream "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > upstream_tags
git ls-remote ${{ github.server_url}}/${{ github.repository }} "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > destination_tags
cat upstream_tags destination_tags | tr ' ' '\n' | sort | uniq -u > missing_tags
git ls-remote $upstream "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' | sort > upstream_tags
git ls-remote ${{ github.server_url}}/${{ github.repository }} "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' | sort > destination_tags
comm -23 upstream_tags destination_tags > missing_tags
echo "Missing tags:"
cat missing_tags
- name: Missing tag fetch