Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 5f503d8

Browse files
author
Andres
committed
Skip release if the current origin is not the goal
1 parent 772b3e6 commit 5f503d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/release.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ if [[ -z "$REPO_NAME" || -z "$REPO_DOMAIN" ]]; then
4141
exit 1
4242
fi
4343

44+
origin=`git config --get remote.origin.url`
45+
if [[ "$origin" != "https://github.com/$REPO_DOMAIN/$REPO_NAME" ]]; then
46+
echo "The current origin is not the goal of the relase. Skipping..."
47+
exit 0
48+
fi
49+
4450
repo_check=`curl -s https://api.github.com/repos/$REPO_DOMAIN/$REPO_NAME`
4551
if [[ $repo_check == *"Not Found"* ]]; then
4652
echo "Not found a Github repository for $REPO_DOMAIN/$REPO_NAME, it is not possible to publish it" > /dev/stderr

0 commit comments

Comments
 (0)