From d68131c139bbde0ab6b7454c87c0fff662349229 Mon Sep 17 00:00:00 2001 From: forge Date: Fri, 18 Oct 2024 11:02:14 +0000 Subject: [PATCH] Use comm instead of uniq to compute missing tags --- .forgejo/workflows/mirror-repository.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/mirror-repository.yml b/.forgejo/workflows/mirror-repository.yml index b2527d56a..8263173b7 100644 --- a/.forgejo/workflows/mirror-repository.yml +++ b/.forgejo/workflows/mirror-repository.yml @@ -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