Skip to content

Commit e3b8cb8

Browse files
committed
1.0.0
1 parent 7d1cdcd commit e3b8cb8

9 files changed

Lines changed: 119 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: Release version, for example 0.11.0
7+
description: Release version, for example 1.0.0
88
required: true
99
type: string
1010

CHANGELOG.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,102 @@
22

33
## Unreleased
44

5+
6+
## 1.0.0 - 2026-05-26
7+
8+
This release makes `g` safer, more reliable, and easier to install, while keeping the same tiny POSIX shell script you can inspect, copy, and patch.
9+
10+
`g` is a simple Go version manager, gluten-free. It installs official prebuilt Go archives as an unprivileged user, keeps your environment simple, and avoids shims, plugins, daemons, and runtime dependencies.
11+
12+
Release highlights include:
13+
14+
- **Official Go metadata** for version discovery and archive selection
15+
- **SHA-256 verification** before extracting downloaded Go archives
16+
- **Archive mirror support** with upstream metadata as the trust source
17+
- **Hardened installer behavior** across common shells and Linux distributions
18+
- **GitHub Release assets** for fresh installs and self-upgrades
19+
- **Clearer errors and recovery guidance** for unsupported platforms and incomplete installs
20+
- **Expanded CI coverage** across pinned Linux environments
21+
- **Automated release publishing** for future releases
22+
23+
### Upgrade now
24+
25+
If you already have `g` installed, upgrade with:
26+
27+
```sh
28+
g self-upgrade
29+
```
30+
31+
For a fresh install:
32+
33+
```sh
34+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh
35+
```
36+
37+
Or with `wget`:
38+
39+
```sh
40+
wget -qO- https://github.com/stefanmaric/g/releases/latest/download/install | sh
41+
```
42+
43+
### Official Go metadata
44+
45+
`g` now uses Go's official download metadata instead of scraping version information from HTML.
46+
47+
That means version discovery, archive selection, platform overrides, unstable releases, and checksum verification now all come from the same upstream source of truth.
48+
49+
### Verified downloads
50+
51+
Downloaded Go archives are now verified with SHA-256 checksums from official Go metadata before extraction.
52+
53+
If a download is corrupted, incomplete, or unexpected, `g` stops before it can become an active Go installation.
54+
55+
### Archive mirrors
56+
57+
You can now download Go archives from a mirror while still trusting official Go metadata for version and checksum information.
58+
59+
```sh
60+
G_GO_ARCHIVE_URL=https://mirror.example/golang g install latest
61+
```
62+
63+
Or per command:
64+
65+
```sh
66+
g install latest --archive-url https://mirror.example/golang
67+
```
68+
69+
### A tougher installer
70+
71+
The installer now handles more real-world systems and shells, including environments without `/etc/shells`, improved `ash` and `dash` setup guidance, fixed `tcsh` detection, duplicate shell selection prevention, and safer alias collision handling.
72+
73+
The goal is still the same: configure `GOROOT`, `GOPATH`, and `$GOPATH/bin` with as little magic as possible.
74+
75+
### GitHub Release assets
76+
77+
Fresh installs and self-upgrades now use GitHub Release assets instead of deprecated `git.io` short links.
78+
79+
This makes the install path more transparent, inspectable, and aligned with how releases are published.
80+
81+
### Better CLI resilience
82+
83+
`g` now reports clearer errors for unknown operating systems, unknown architectures, unsupported Go archive combinations, incomplete installs, and missing `$GOPATH/bin` entries in `PATH`.
84+
85+
This release also adds familiar command aliases:
86+
87+
```sh
88+
g use latest
89+
g fetch 1.22.2
90+
g ls
91+
g rm 1.21.9
92+
g self-update
93+
```
94+
95+
### CI and releases
96+
97+
The test suite now covers more metadata, checksum, installer, shell, and smoke-test behavior. CI also runs across pinned Linux environments to catch portability issues earlier.
98+
99+
Future releases are now prepared through a release PR and published automatically after merge.
100+
5101
## 0.11.0 - 2026-05-26
6102

7103
- Upgrade all dev dependencies and CI environment

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ You most likely have them all already.
3535

3636
## Installation
3737

38-
Before running any script, read it first: [`https://git.io/g-install`](https://git.io/g-install)
38+
Before running any script, read it first: [`https://github.com/stefanmaric/g/releases/latest/download/install`](https://github.com/stefanmaric/g/releases/latest/download/install)
3939

4040
Then install with `curl`:
4141

4242
```shell
43-
curl -fsSL https://git.io/g-install | sh
43+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh
4444
```
4545

4646
Or with `wget`:
4747

4848
```shell
49-
wget -qO- https://git.io/g-install | sh
49+
wget -qO- https://github.com/stefanmaric/g/releases/latest/download/install | sh
5050
```
5151

5252
`g` uses the standard Go environment variables. The installer defaults to:
@@ -67,19 +67,19 @@ Restart your shell after installation so the new environment is loaded.
6767
Skip all prompts and assume "yes", will install the lastest Go version right away:
6868

6969
```shell
70-
curl -fsSL https://git.io/g-install | sh -s -- -y
70+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- -y
7171
```
7272

7373
Configure a specific shell:
7474

7575
```shell
76-
curl -fsSL https://git.io/g-install | sh -s -- zsh
76+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- zsh
7777
```
7878

7979
Configure more than one shell:
8080

8181
```shell
82-
curl -fsSL https://git.io/g-install | sh -s -- fish bash zsh
82+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- fish bash zsh
8383
```
8484

8585
The installer supports `bash`, `zsh`, `fish`, `ash`, `dash`, `csh`, and `tcsh`.
@@ -91,15 +91,15 @@ To choose different defaults, set `GOROOT` and `GOPATH` before installing:
9191
```shell
9292
export GOROOT=$HOME/.local/share/golang
9393
export GOPATH=$HOME/go-projects
94-
curl -fsSL https://git.io/g-install | sh
94+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh
9595
```
9696

9797
For `fish`:
9898

9999
```shell
100100
set -gx GOROOT $HOME/.local/share/golang
101101
set -gx GOPATH $HOME/go-projects
102-
curl -fsSL https://git.io/g-install | sh
102+
curl -fsSL https://github.com/stefanmaric/g/releases/latest/download/install | sh
103103
```
104104

105105
## Manual Installation

bin/g

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ esac
6565
#
6666

6767
display_g_version() {
68-
echo "0.11.0"
68+
echo "1.0.0"
6969
}
7070

7171
display_help() {
@@ -1109,9 +1109,9 @@ self_upgrade() {
11091109
fi
11101110

11111111
if command -v curl > /dev/null; then
1112-
curl -sSL https://git.io/g-install | sh -s -- -y
1112+
curl -sSL https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- -y
11131113
elif command -v wget > /dev/null; then
1114-
wget -qO- https://git.io/g-install | sh -s -- -y
1114+
wget -qO- https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- -y
11151115
else
11161116
error_and_abort "curl or wget required"
11171117
fi

bin/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fi
8383

8484
NON_INTERACTIVE=false
8585

86-
G_DOWNLOAD_URL="https://git.io/g-bin"
86+
G_DOWNLOAD_URL="https://github.com/stefanmaric/g/releases/latest/download/g"
8787
SHELLS_FILE=${G_SHELLS_FILE:-/etc/shells}
8888

8989
COMMENT_MESSAGE="g-install: do NOT edit, see https://github.com/stefanmaric/g"

bin/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ validate_version() {
7878
esac
7979

8080
printf '%s\n' "$1" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' \
81-
|| die "release version must look like 0.11.0: $1"
81+
|| die "release version must look like 1.0.0: $1"
8282
}
8383

8484
validate_release_request() {

mocks/curl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ set -o errexit
88
set -o nounset
99

1010
BASE_DIR="$(dirname -- "$0")"
11-
G_URL="https://git.io/g-bin"
11+
G_URL="https://github.com/stefanmaric/g/releases/latest/download/g"
1212
G_LOCATION="$BASE_DIR/../bin/g"
13-
INSTALL_URL="https://git.io/g-install"
13+
INSTALL_URL="https://github.com/stefanmaric/g/releases/latest/download/install"
1414
INSTALL_LOCATION="$BASE_DIR/../bin/install"
1515
METADATA_URL="https://go.dev/dl/?mode=json"
1616
METADATA_ALL_URL="https://go.dev/dl/?mode=json&include=all"

mocks/wget

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ set -o errexit
88
set -o nounset
99

1010
BASE_DIR="$(dirname -- "$0")"
11-
G_URL="https://git.io/g-bin"
11+
G_URL="https://github.com/stefanmaric/g/releases/latest/download/g"
1212
G_LOCATION="$BASE_DIR/../bin/g"
13-
INSTALL_URL="https://git.io/g-install"
13+
INSTALL_URL="https://github.com/stefanmaric/g/releases/latest/download/install"
1414
INSTALL_LOCATION="$BASE_DIR/../bin/install"
1515
METADATA_URL="https://go.dev/dl/?mode=json"
1616
METADATA_ALL_URL="https://go.dev/dl/?mode=json&include=all"

tests/smoke.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ create_smoke_mocks() {
2222
2323
for item in "\$@"; do
2424
case \$item in
25-
https://git.io/g-install) cat "$repo_root/bin/install"; exit 0 ;;
26-
https://git.io/g-bin) cat "$repo_root/bin/g"; exit 0 ;;
25+
https://github.com/stefanmaric/g/releases/latest/download/install) cat "$repo_root/bin/install"; exit 0 ;;
26+
https://github.com/stefanmaric/g/releases/latest/download/g) cat "$repo_root/bin/g"; exit 0 ;;
2727
esac
2828
done
2929
@@ -40,8 +40,8 @@ EOF
4040
4141
for item in "\$@"; do
4242
case \$item in
43-
https://git.io/g-install) cat "$repo_root/bin/install"; exit 0 ;;
44-
https://git.io/g-bin) cat "$repo_root/bin/g"; exit 0 ;;
43+
https://github.com/stefanmaric/g/releases/latest/download/install) cat "$repo_root/bin/install"; exit 0 ;;
44+
https://github.com/stefanmaric/g/releases/latest/download/g) cat "$repo_root/bin/g"; exit 0 ;;
4545
esac
4646
done
4747
@@ -80,7 +80,7 @@ test_expect_success 'install script configures g' '
8080
REAL_WGET="$real_wget" \
8181
PATH="$mock_path:$PATH" \
8282
SHELL=/bin/bash \
83-
sh -c "curl -sSL https://git.io/g-install | sh -s -- -y bash"
83+
sh -c "curl -sSL https://github.com/stefanmaric/g/releases/latest/download/install | sh -s -- -y bash"
8484
'
8585

8686
test_expect_success 'g reports its version' '

0 commit comments

Comments
 (0)