From f6ec17100b309b8663d58ccd07ebab1f8f94482d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 18 Oct 2024 06:57:01 -0400 Subject: [PATCH] Use comm to figure out 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 925e106bee67..9d7c347b3054 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|.*/||' | grep -v "nightly" > 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|.*/||' | grep -v "nightly" | 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