Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 59bc9d8

Browse files
authored
Add bump job (#571)
1 parent b74352f commit 59bc9d8

1 file changed

Lines changed: 31 additions & 5 deletions

File tree

README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ Under the hood tea/gui installs and manages your packages with [`tea/cli`]
1818
while exposing additional functionality, features and informational touches
1919
that complement and expand upon the nature of package management.
2020

21-
To install the gui, visit: https://tea.xyz/gui/ and download the latest
21+
To install the gui, visit: <https://tea.xyz/gui/> and download the latest
2222
version. The gui auto-updates itself.
2323

2424
&nbsp;
2525

26-
2726
# Contributing to `tea/gui`
2827

2928
If you have suggestions or ideas, start a [discussion]. If we agree, we’ll
@@ -40,7 +39,6 @@ technologies are used:
4039
- [fontastic](https://fontastic.me)
4140
- [electron](http://electronjs.org)
4241

43-
4442
# Hacking on `tea/gui`
4543

4644
```sh
@@ -53,7 +51,6 @@ xc dev # opens the app in dev mode
5351
5452
&nbsp;
5553

56-
5754
# Tasks
5855

5956
The following can be run with [`xc`], eg. `xc build`.
@@ -104,15 +101,44 @@ pnpm --filter tea exec pnpm dist
104101
```
105102

106103
## Check
104+
107105
Runs the typescript compiler and linter.
108106

109107
```sh
110108
pnpm run -r check
111109
pnpm run -r lint
112110
```
113111

114-
&nbsp;
112+
## Bump
113+
114+
Inputs: PRIORITY
115+
116+
```sh
117+
if ! git diff-index --quiet HEAD --; then
118+
echo "error: dirty working tree" >&2
119+
exit 1
120+
fi
115121

122+
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then
123+
echo "error: requires main branch" >&2
124+
exit 1
125+
fi
126+
127+
V=$(git describe --tags --abbrev=0 --match "v[0-9]*.[0-9]*.[0-9]*")
128+
V=$(tea semverator bump $V $PRIORITY)
129+
130+
if ! grep -F "\"version\": \"$V\",$" modules/desktop/package.json; then
131+
sed -i.bak -e "s/\"version\": .*,$/\"version\": \"$V\",/" modules/desktop/package.json
132+
rm modules/desktop/package.json.bak
133+
git add modules/desktop/package.json
134+
git commit -m "bump $V" --gpg-sign
135+
fi
136+
137+
git push origin main
138+
tea gh release create "v$V"
139+
```
140+
141+
&nbsp;
116142

117143
# Dependencies
118144

0 commit comments

Comments
 (0)