Skip to content

Commit 3d73252

Browse files
committed
Move version to version.go and update it
1 parent 2053862 commit 3d73252

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ install-lint-deps:
4545

4646
# Create a new release
4747
release:
48-
@echo "Current version in main.go: $$(grep 'Version:' main.go | sed 's/.*Version: *"\(.*\)".*/\1/')"
48+
@echo "Current version in version.go: $$(grep 'Version' version.go | sed 's/.*Version = "\(.*\)".*/\1/')"
4949
@echo "Current version in SECURITY.md: $$(grep -A2 '| Version' SECURITY.md | tail -1 | sed 's/| *\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')"
5050
@echo ""
5151
@read -p "Enter the new semver version (e.g., 2.1.0): " VERSION; \
@@ -59,12 +59,12 @@ release:
5959
fi; \
6060
MAJOR_MINOR=$$(echo "$$VERSION" | sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/'); \
6161
echo "Updating version to $$VERSION..."; \
62-
sed -i.bak 's/Version: *"[^"]*"/Version: "'"$$VERSION"'"/' main.go && rm main.go.bak; \
62+
sed -i.bak 's/Version = "[^"]*"/Version = "'"$$VERSION"'"/' version.go && rm version.go.bak; \
6363
sed -i.bak 's/| [0-9]*\.[0-9]*\.[0-9]* *|/| '"$$MAJOR_MINOR"'.x |/' SECURITY.md && rm SECURITY.md.bak; \
6464
echo "Files updated successfully."; \
6565
echo ""; \
6666
echo "Staging and committing changes..."; \
67-
git add main.go SECURITY.md; \
67+
git add version.go SECURITY.md; \
6868
git commit -m "Update version to $$VERSION"; \
6969
echo ""; \
7070
echo "Changes committed successfully!"; \

SECURITY.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Security Policy
22

3-
## Supported Versions
4-
5-
Only the versions in the table below will receive security updates.
6-
7-
| Version | Supported |
8-
| ------- | ------------------ |
9-
| 2.0.6 | :white_check_mark: |
10-
113
## Reporting a Vulnerability
124

135
Use the [private vulnerability reporting feature](https://github.com/Link-/gh-token/security/advisories) to report security problems.

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func main() {
1313
app := &cli.App{
1414
Name: "gh-token",
1515
Usage: "Manage GitHub App installation tokens",
16-
Version: "2.0.6",
16+
Version: Version,
1717
EnableBashCompletion: true,
1818
Suggest: true,
1919
Commands: []*cli.Command{

version.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package main
2+
3+
// Version is the current version of the gh-token CLI.
4+
const Version = "2.0.8"

0 commit comments

Comments
 (0)