Use comm instead of uniq to compute missing tags

This commit is contained in:
Antoine Martin 2024-10-18 11:02:14 +00:00
parent 2afe995ddc
commit d68131c139

View file

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