Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aiKrice committed Dec 5, 2024
2 parents 87ebd06 + ab6db25 commit 5d4f1c3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/badgetizr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3

- name: Run Badgetizr
uses: aiKrice/[email protected].1
uses: aiKrice/[email protected].2
with:
pr_id: ${{ github.event.pull_request.number }}
configuration: .badgetizr.yml
Expand Down
2 changes: 1 addition & 1 deletion utils.sh → Formula/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Options :
EOF
}

BADGETIZR_VERSION="1.5.1"
BADGETIZR_VERSION="1.5.2"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<h1 align="center">
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)

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
uses: actions/checkout@v3

- name: Run Badgetizr
uses: aiKrice/[email protected].1
uses: aiKrice/[email protected].2
with:
pr_id: ${{ github.event.pull_request.number }}
configuration: .badgetizr.yml
Expand Down
2 changes: 1 addition & 1 deletion badgetizr
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
11 changes: 8 additions & 3 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 5d4f1c3

Please sign in to comment.