Skip to content

Commit

Permalink
build: add rerelease command
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Apr 19, 2023
1 parent 3bd81d1 commit f7bcdc9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
# github-token: ${{ secrets.github_token }}
github-token: ${{ secrets.github_token }}
# output-file: "false"
skip-commit: "true"
skip-tag: "true"
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ build-release:
github-release:
bin/release

github-rerelease:
bin/rerelease

local-release: build-release
bin/local-release

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ You can hit the API locally for testing using: `http localhost:9029/status`
- Run the binary manually `swift run`
- Copy local config `cp ./config.json ~/.config/focus/config.json`
- Generate a new release `git tag v0.1.3 && git push --tags origin HEAD`
- Delete last tag remotely and locally `TAG=$(git describe --tags --abbrev=0); git tag -d $TAG; git push --delete origin $TAG`

## Tests

Expand Down
4 changes: 3 additions & 1 deletion bin/release
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
cd "${0%/*}/.." || exit
set -e

cd "${0%/*}/.."

# trunk-ignore(shellcheck/SC2312)
version=$(git tag --list | tail -n 1)
Expand Down
12 changes: 12 additions & 0 deletions bin/rerelease
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

cd "${0%/*}/.."

# delete last tag remotely and locally
# useful when trying to get gh action releases to work
TAG=$(git describe --tags --abbrev=0)
git tag -d "${TAG}"
git push --delete origin "${TAG}"

bin/release

0 comments on commit f7bcdc9

Please sign in to comment.