Add bump job (#571)

This commit is contained in:
Jacob Heider 2023-05-06 19:16:55 -04:00 committed by GitHub
parent b74352fb54
commit 59bc9d8ef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,12 +18,11 @@ Under the hood tea/gui installs and manages your packages with [`tea/cli`]
while exposing additional functionality, features and informational touches
that complement and expand upon the nature of package management.
To install the gui, visit: https://tea.xyz/gui/ and download the latest
To install the gui, visit: <https://tea.xyz/gui/> and download the latest
version. The gui auto-updates itself.
&nbsp;
# Contributing to `tea/gui`
If you have suggestions or ideas, start a [discussion]. If we agree, well
@ -40,7 +39,6 @@ technologies are used:
- [fontastic](https://fontastic.me)
- [electron](http://electronjs.org)
# Hacking on `tea/gui`
```sh
@ -53,7 +51,6 @@ xc dev # opens the app in dev mode
&nbsp;
# Tasks
The following can be run with [`xc`], eg. `xc build`.
@ -104,6 +101,7 @@ pnpm --filter tea exec pnpm dist
```
## Check
Runs the typescript compiler and linter.
```sh
@ -111,8 +109,36 @@ pnpm run -r check
pnpm run -r lint
```
&nbsp;
## Bump
Inputs: PRIORITY
```sh
if ! git diff-index --quiet HEAD --; then
echo "error: dirty working tree" >&2
exit 1
fi
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
echo "error: requires main branch" >&2
exit 1
fi
V=$(git describe --tags --abbrev=0 --match "v[0-9]*.[0-9]*.[0-9]*")
V=$(tea semverator bump $V $PRIORITY)
if ! grep -F "\"version\": \"$V\",$" modules/desktop/package.json; then
sed -i.bak -e "s/\"version\": .*,$/\"version\": \"$V\",/" modules/desktop/package.json
rm modules/desktop/package.json.bak
git add modules/desktop/package.json
git commit -m "bump $V" --gpg-sign
fi
git push origin main
tea gh release create "v$V"
```
&nbsp;
# Dependencies