Skip to content

Commit

Permalink
Updated tag checks
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshixx committed Apr 19, 2021
1 parent c0f10cb commit c9effee
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-gdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ jobs:
id: tag_release
run: |
set +e
if [ $(git tag "gdb-v${{ needs.build-x86.outputs.version }}") ];then
if git rev-list "gdb-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then
echo "Tag for gdb-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
else
git tag "gdb-v${{ needs.build-x86.outputs.version }}"
git push origin "gdb-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true"
else
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
fi
- name: Create Release
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-nmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ jobs:
- name: Tag Release
run: |
set +e
if [ $(git tag "nmap-v${{ needs.build-x86.outputs.version }}") ];then
if git rev-list "nmap-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then
echo "Tag for nmap-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
else
git tag "nmap-v${{ needs.build-x86.outputs.version }}"
git push origin "nmap-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true"
else
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
fi
- name: Create Release
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-socat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,13 @@ jobs:
id: tag_release
run: |
set +e
if [ $(git tag "socat-v${{ needs.build-x86.outputs.version }}") ];then
if git rev-list "socat-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then
echo "Tag for socat-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
else
git tag "socat-v${{ needs.build-x86.outputs.version }}"
git push origin "socat-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true"
else
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
fi
- name: Create Release
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-tcpdump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ jobs:
- name: Tag Release
run: |
set +e
if [ $(git tag "tcpdump-v${{ needs.build-x86.outputs.version }}") ];then
if git rev-list "tcpdump-v${{ needs.build-x86.outputs.version }}".. >/dev/null;then
echo "Tag for tcpdump-v${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
else
git tag "tcpdump-v${{ needs.build-x86.outputs.version }}"
git push origin "tcpdump-v${{ needs.build-x86.outputs.version }}"
echo ::set-output name=NEW_RELEASE::"true"
else
echo "Tag for version ${{ needs.build-x86.outputs.version }} already exists. Skipping release creation."
echo ::set-output name=NEW_RELEASE::"false"
fi
- name: Create Release
Expand Down

0 comments on commit c9effee

Please sign in to comment.