-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.rsl
executable file
·40 lines (32 loc) · 1.07 KB
/
release.rsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env radd
---
Bumps the version in rad, creates a commit, tags it, and optionally pushes it
Bumps the version in rad, creates a commit, tags it, and optionally pushes it
This will trigger a GitHub action to create a homebrew-rad PR with the new version
---
args:
version string # The new release version to bump to
push p bool # Whether or not a push should also be performed
docs d bool # Also deploy docs.
// Build & test
$`./push.rsl --no-push`
fail:
print("❌ Failed to build and test!")
path = "./core/version.go"
// Update Version in ./core/version.go
$`sed -i '' "s/Version = \".*\"/Version = \"{version}\"/" {path}`
fail:
print("❌ Failed to update version in code!")
$!`git add {path}`
$!`git commit -m "Bump version to {version}" {path}`
$!`git tag -a "{version}" -m "Bump version to {version}"`
if push:
$`./push.rsl`
fail:
print("❌ Failed to push!")
else:
print("Tagged, not pushing...")
print(`Run {yellow("git push origin main --tags")} to push the tag`)
if docs:
$!`./deploy_docs.rsl`
print("✅ Finished!")