diff --git a/.github/workflows/badgetizr.yml b/.github/workflows/badgetizr.yml index 28229ae..44e4af3 100644 --- a/.github/workflows/badgetizr.yml +++ b/.github/workflows/badgetizr.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v3 - name: Run Badgetizr - uses: aiKrice/homebrew-badgetizr@1.5.1 + uses: aiKrice/homebrew-badgetizr@1.5.2 with: pr_id: ${{ github.event.pull_request.number }} configuration: .badgetizr.yml diff --git a/utils.sh b/Formula/utils.sh similarity index 97% rename from utils.sh rename to Formula/utils.sh index 1701c06..7aed281 100755 --- a/utils.sh +++ b/Formula/utils.sh @@ -27,4 +27,4 @@ Options : EOF } -BADGETIZR_VERSION="1.5.1" \ No newline at end of file +BADGETIZR_VERSION="1.5.2" diff --git a/README.md b/README.md index 4a1214f..f2874fe 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@

Badgetizr -![Static Badge](https://img.shields.io/${VERSION}-darkgreen?logo=homebrew&logoColor=white&label=Homebrew-tap) -[![Static Badge](https://img.shields.io/${VERSION}-grey?logo=github&logoColor=white&label=Github-Action&labelColor=black)](https://github.com/marketplace/actions/badgetizr) +![Static Badge](https://img.shields.io/1.5.2-darkgreen?logo=homebrew&logoColor=white&label=Homebrew-tap) +[![Static Badge](https://img.shields.io/1.5.2-grey?logo=github&logoColor=white&label=Github-Action&labelColor=black)](https://github.com/marketplace/actions/badgetizr) ![Static Badge](https://img.shields.io/badge/passed-darkgreen?logo=github&logoColor=white&label=Github&labelColor=black) ![Static Badge](https://img.shields.io/badge/soon-pink?logo=gitlab&logoColor=orange&label=Gitlab&labelColor=white) @@ -92,7 +92,7 @@ jobs: uses: actions/checkout@v3 - name: Run Badgetizr - uses: aiKrice/homebrew-badgetizr@1.5.1 + uses: aiKrice/homebrew-badgetizr@1.5.2 with: pr_id: ${{ github.event.pull_request.number }} configuration: .badgetizr.yml diff --git a/badgetizr b/badgetizr index 9e1c42a..37c6ddd 100755 --- a/badgetizr +++ b/badgetizr @@ -4,7 +4,7 @@ if [ -f "$(dirname "$0")/../libexec/utils.sh" ]; then UTILS_PATH="$(dirname "$0")/../libexec/utils.sh" else - UTILS_PATH="$(dirname "$0")/utils.sh" + UTILS_PATH="$(dirname "$0")/Formula/utils.sh" fi source "$UTILS_PATH" diff --git a/publish.sh b/publish.sh index ddd168e..d349b0d 100755 --- a/publish.sh +++ b/publish.sh @@ -10,7 +10,7 @@ REPOSITORY="aiKrice/homebrew-badgetizr" FORMULA_PATH="Formula/badgetizr.rb" WORKFLOW_PATH=".github/workflows/badgetizr.yml" -UTILS_PATH="utils.sh" +UTILS_PATH="Formula/utils.sh" README_PATH="README.md" VERSION="$1" @@ -42,10 +42,15 @@ if [ -z "$GITHUB_TOKEN" ]; then exit 1 fi +git switch develop +fail_if_error "Failed to switch develop. Please stash changes." +git pull +fail_if_error "Failed to pull develop. Please stash changes." + # Changing the version for -v option sed -i '' "s|^BADGETIZR_VERSION=.*|BADGETIZR_VERSION=\"$VERSION\"|" "$UTILS_PATH" -sed -i '' -E "s/(badge\/)[0-9]+\.[0-9]+\.[0-9]+(-darkgreen\?logo=homebrew)/\${VERSION}\2/" "$README_PATH" -sed -i '' -E "s/(badge\/)[0-9]+\.[0-9]+\.[0-9]+(-grey\?logo=github)/\${VERSION}\2/" "$README_PATH" +sed -i '' -E "s/(badge\/)[0-9]+\.[0-9]+\.[0-9]+(-darkgreen\?logo=homebrew)/${VERSION}\2/" "$README_PATH" +sed -i '' -E "s/(badge\/)[0-9]+\.[0-9]+\.[0-9]+(-grey\?logo=github)/${VERSION}\2/" "$README_PATH" sed -i '' "s|uses: aiKrice/homebrew-badgetizr@.*|uses: aiKrice/homebrew-badgetizr@${VERSION}|" "$WORKFLOW_PATH" "$README_PATH" git add "$UTILS_PATH" "$WORKFLOW_PATH" "$README_PATH"