Skip to content
Open
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
bdb6870
Goenv go migration
AdamDrewsTR Oct 11, 2025
200c91e
GOENV_AUTO_INSTALL
AdamDrewsTR Oct 11, 2025
53ce196
Windows support, maybe
AdamDrewsTR Oct 11, 2025
ae8df47
Don't commit this
AdamDrewsTR Oct 11, 2025
b31ba42
Update workflows
AdamDrewsTR Oct 11, 2025
d0ce3ba
Remove old tests
AdamDrewsTR Oct 11, 2025
98b57a3
Remove plugins
AdamDrewsTR Oct 11, 2025
8991528
Powershell makes
AdamDrewsTR Oct 11, 2025
82069d2
Minor cleanup
AdamDrewsTR Oct 11, 2025
0415fee
Cleanup
AdamDrewsTR Oct 11, 2025
5e87ac3
Remove legacy code
AdamDrewsTR Oct 11, 2025
c167770
Fix 0 args output
AdamDrewsTR Oct 11, 2025
4f9e7e1
Near parity
AdamDrewsTR Oct 11, 2025
f566ecf
Win compat
AdamDrewsTR Oct 12, 2025
e62c89a
Don't remove go in workflows
AdamDrewsTR Oct 12, 2025
b73234d
Swap local goenv script for testing
AdamDrewsTR Oct 12, 2025
1501407
More verbose caching/version list strategy
AdamDrewsTR Oct 12, 2025
d1e561c
Prefer toolchain version over go version
AdamDrewsTR Oct 12, 2025
fad9bd1
List tests
AdamDrewsTR Oct 13, 2025
8e2a30d
Consistent stdio
AdamDrewsTR Oct 13, 2025
905ee05
Swap go script
AdamDrewsTR Oct 13, 2025
f8a5fc3
Arg validation
AdamDrewsTR Oct 13, 2025
a3ebc26
Expand path, tilde fixes
AdamDrewsTR Oct 13, 2025
be2204b
Minor fixes
AdamDrewsTR Oct 13, 2025
7d7a9f5
Add completion installer
AdamDrewsTR Oct 13, 2025
6a3f93f
Completion docs
AdamDrewsTR Oct 13, 2025
3f2c5e4
gofmt, fix tests, versions hardening, more rehash tests
AdamDrewsTR Oct 14, 2025
de8da24
Hooks, shorthand, plugins, --complete flag, docs
AdamDrewsTR Oct 14, 2025
1735e5a
Revert hooks, plugins. It is far too risky -> arbitrary execution
AdamDrewsTR Oct 16, 2025
34db824
Safer hooks
AdamDrewsTR Oct 17, 2025
646677b
Ability to disable auto rehash, update docs
AdamDrewsTR Oct 20, 2025
d242533
Update readme
AdamDrewsTR Oct 20, 2025
c2cb034
VSCode integration, shorthands
AdamDrewsTR Oct 20, 2025
30fba68
Binary release
AdamDrewsTR Oct 20, 2025
1fe1646
Fix swap, rehash, init loop
AdamDrewsTR Oct 20, 2025
acaa2e1
Enhanced errors, fix global goenv path installs
AdamDrewsTR Oct 20, 2025
63c32a0
fmt
AdamDrewsTR Oct 20, 2025
f47086b
GOENV_GOPATH_PREFIX impl, Fix possible race condition
AdamDrewsTR Oct 20, 2025
8161d9e
More tfswitchy
AdamDrewsTR Oct 21, 2025
0cfab8c
More verbose discovery
AdamDrewsTR Oct 21, 2025
67e6f60
VScode/gitignore
ChronosMasterOfAllTime Oct 21, 2025
6c42e5c
Smarter auto install
AdamDrewsTR Oct 21, 2025
6e83a09
Remove GOENV_GOMOD_VERSION_ENABLE
AdamDrewsTR Oct 21, 2025
71d1665
env vars with stricter defs
ChronosMasterOfAllTime Oct 21, 2025
0841949
Update docs
AdamDrewsTR Oct 21, 2025
5324aff
Fix init printing script prior to execution (not silent)
AdamDrewsTR Oct 22, 2025
eb29f64
Go go build, makes
AdamDrewsTR Oct 22, 2025
8363f47
Update gh config
AdamDrewsTR Oct 22, 2025
b5ff77a
Fix pathing issues, Simplify new commands but keep backwards compat
AdamDrewsTR Oct 23, 2025
cbc5f2c
Add clean command, enhance doctor
AdamDrewsTR Oct 23, 2025
ff2dba6
Rename migrate sync-tools
AdamDrewsTR Oct 23, 2025
c9d9924
Fix tests
AdamDrewsTR Oct 23, 2025
a8df2b3
Fix race condition
AdamDrewsTR Oct 23, 2025
72ddf17
Fix pr checks?
AdamDrewsTR Oct 23, 2025
f2b4ab5
Handle system go
AdamDrewsTR Oct 23, 2025
488efcf
Try again
AdamDrewsTR Oct 23, 2025
095cfd5
Try again :/
AdamDrewsTR Oct 23, 2025
a4a7b7c
Ensure output to stdout
AdamDrewsTR Oct 23, 2025
dc630cd
Update clean test
AdamDrewsTR Oct 23, 2025
ec395db
Fix init tests while still fixing init out
AdamDrewsTR Oct 23, 2025
15f7c6f
Windows fixes?
AdamDrewsTR Oct 23, 2025
be394ac
Cache isolation
AdamDrewsTR Oct 23, 2025
4f469a8
More windows fixes, docs for cache isolation
AdamDrewsTR Oct 23, 2025
e39c26b
Windohs strikes again
AdamDrewsTR Oct 23, 2025
99ae2da
More windohs patches
AdamDrewsTR Oct 23, 2025
b1fbc76
More pathutils
AdamDrewsTR Oct 24, 2025
fbd4e48
More path utils, even more isolation
AdamDrewsTR Oct 24, 2025
27dafdd
Everywhere but Windows Slash to win-slash
AdamDrewsTR Oct 24, 2025
7507342
More widows fixes
AdamDrewsTR Oct 24, 2025
2456190
# more windows
AdamDrewsTR Oct 24, 2025
0f67c8e
Even more
AdamDrewsTR Oct 24, 2025
08e8634
Windows is a pane
AdamDrewsTR Oct 24, 2025
e8ae384
This one too
AdamDrewsTR Oct 24, 2025
35517a1
Whence windows
AdamDrewsTR Oct 24, 2025
f907273
Hopefully, maybe
AdamDrewsTR Oct 24, 2025
49c5d79
Race condition?
AdamDrewsTR Oct 24, 2025
5cbfb51
Harden action more
AdamDrewsTR Oct 24, 2025
0217bed
Cleaner approach
AdamDrewsTR Oct 24, 2025
e95e1ac
This finally it?
AdamDrewsTR Oct 24, 2025
2d329cf
Curses!
AdamDrewsTR Oct 24, 2025
d0089f5
Skip it then
AdamDrewsTR Oct 24, 2025
89e58ed
Different sleep mech
AdamDrewsTR Oct 24, 2025
374a5b0
!MAJOR! enhancements
AdamDrewsTR Oct 24, 2025
09b8252
Fix tests maybe
AdamDrewsTR Oct 24, 2025
bc0aac0
More isolation
AdamDrewsTR Oct 24, 2025
21818e5
More fixes
AdamDrewsTR Oct 24, 2025
5591c0b
More isolation
AdamDrewsTR Oct 24, 2025
3d45907
Hopefully fix
AdamDrewsTR Oct 24, 2025
b0ac6c5
Winduhs
AdamDrewsTR Oct 24, 2025
c080c6f
Remove old
AdamDrewsTR Oct 28, 2025
5402e28
update go.mod
ChronosMasterOfAllTime Oct 28, 2025
3d7d066
Nitpicks, docs, etc
AdamDrewsTR Oct 28, 2025
c76cca5
Organize cmd
AdamDrewsTR Oct 29, 2025
10a00e9
Windohs fixes
AdamDrewsTR Oct 29, 2025
38d937f
Add refs
AdamDrewsTR Oct 29, 2025
000830c
Windows again
AdamDrewsTR Oct 29, 2025
6c8a5b6
Write changes for windows
AdamDrewsTR Oct 29, 2025
66d9411
Enhance
AdamDrewsTR Oct 31, 2025
2abd211
Windows fixes
AdamDrewsTR Oct 31, 2025
b282474
Windohs path fix
AdamDrewsTR Oct 31, 2025
551eb7b
Try again
AdamDrewsTR Oct 31, 2025
2aef918
Again
AdamDrewsTR Oct 31, 2025
1de892c
Again
AdamDrewsTR Oct 31, 2025
d8d0fd2
Sigh
AdamDrewsTR Oct 31, 2025
ae00c59
Le sigh
AdamDrewsTR Oct 31, 2025
a217f78
So annoying
AdamDrewsTR Oct 31, 2025
a1d4017
feat: Interactive + auto-install setup workflows for goenv + MASSIVE …
AdamDrewsTR Nov 2, 2025
6630362
Fix ci tests
AdamDrewsTR Nov 2, 2025
b8c29b0
Windows test fixes
AdamDrewsTR Nov 2, 2025
b44c1d8
Cleanup
AdamDrewsTR Nov 2, 2025
ce74d52
More cleanup
AdamDrewsTR Nov 2, 2025
5e39b9d
Windows again
AdamDrewsTR Nov 2, 2025
536bb23
Testify!
AdamDrewsTR Nov 2, 2025
8819f70
Sync tool fix
AdamDrewsTR Nov 2, 2025
9005774
Cache cleanup
AdamDrewsTR Nov 2, 2025
5a7c78f
Support multiple release drafter configs
ChronosMasterOfAllTime Nov 3, 2025
d81974d
Make-ify
ChronosMasterOfAllTime Nov 3, 2025
c690198
feat: enhance install/uninstall with auto-detection and partial versi…
AdamDrewsTR Nov 5, 2025
3d82b41
Fix windows install script
ChronosMasterOfAllTime Nov 19, 2025
a53ec95
windows compat fixes
ChronosMasterOfAllTime Nov 20, 2025
9323fd0
feat: update Go version to 1.25.4 and enhance PATH order handling in …
AdamDrewsTR Nov 23, 2025
81be55a
Enhance VS Code integration with goenv
AdamDrewsTR Nov 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
# Reclassify files as Shell for proper statistics (instead of "Roff")
libexec/* linguist-language=Shell
plugins/go-build/bin/* linguist-language=Shell
plugins/go-build/share/go-build/* linguist-language=Shell
plugins/go-build/test/fixtures/definitions/* linguist-language=Shell
plugins/go-build/test/stubs/* linguist-language=Shell
src/shobj-conf/* linguist-language=Shell
test/libexec/* linguist-language=Shell

5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
15 changes: 14 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ categories:
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "🏗️ Build System"
labels:
- "build"
- "build-system"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
autolabeler:
Expand All @@ -34,11 +38,20 @@ autolabeler:
- label: "enhancement"
branch:
- '/feature\/.+/i'
- label: "build-system"
files:
- "scripts/build-tool/*"
- "Makefile"
- "build.*"
- ".goreleaser.yml"
title:
- "/build/i"
- label: "go-version"
branch:
- '/feature\/.+/i'
files:
- "plugins/go-build/share/go-build/*"
- "internal/version/embedded_versions.go"
- "scripts/generate_embedded_versions/*"
body:
- '/(add|support) go(lang)? [0-9]+\.[0-9]+(\.[0-9]+)?/i'
version-resolver:
Expand Down
File renamed without changes.
28 changes: 0 additions & 28 deletions .github/workflows/go_versions.yml

This file was deleted.

27 changes: 23 additions & 4 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,33 @@ jobs:
build:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
goenv_native_ext: ["", "1"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Remove golang
run: sudo rm -rf $(which go)
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Build goenv
shell: bash
run: make build
- name: Run Unit Tests
run: make test
shell: bash
run: |
echo "Running tests with GOENV_NATIVE_EXT=${{ matrix.goenv_native_ext }}"
make test 2>&1 | tee test_output.log
test_exit_code=${PIPESTATUS[0]}
if [ $test_exit_code -ne 0 ]; then
echo "Tests failed with exit code $test_exit_code"
echo "=== First 100 lines of output ==="
head -100 test_output.log
echo "=== Last 100 lines of output ==="
tail -100 test_output.log
echo "=== Searching for FAIL ==="
grep -B 5 -A 5 "FAIL" test_output.log || true
exit $test_exit_code
fi
env:
GOENV_NATIVE_EXT: ${{ matrix.goenv_native_ext }}
4 changes: 2 additions & 2 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
run: |
if [[ "${{ github.event.inputs.debug }}" == "true" ]]; then
echo "Debug mode enabled"
./scripts/update_app_version.sh 2>&1 | tee -a debug.log
./.github/scripts/update_app_version.sh 2>&1 | tee -a debug.log
cat debug.log
else
./scripts/update_app_version.sh
./.github/scripts/update_app_version.sh
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Release Binaries

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g., v2.0.0)'
required: false

permissions:
contents: write
packages: write

jobs:
goreleaser:
name: Build Cross-Platform Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: dist/*
retention-days: 7
22 changes: 17 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Publish to Homebrew
name: Publish to Package Managers

on:
workflow_dispatch:
release:
types: [published]

jobs:
release:
# Update Homebrew formula (macOS/Linux)
homebrew:
name: Update Homebrew
if: github.repository_owner == 'go-nv'
strategy:
matrix:
Expand All @@ -14,10 +18,18 @@ jobs:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GH_TOKEN }}
- name: Remove golang
run: sudo rm -rf $(which go)

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "stable"

- name: Build goenv
run: make build

- name: Add goenv to PATH
run: export PATH="$PATH:./bin/goenv"
run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH

- name: Create Homebrew PR
uses: dawidd6/action-homebrew-bump-formula@v5
with:
Expand Down
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,17 @@
/bats/
/bats-core/
.idea
plugins/go-build/test/tmp/

# Go build artifacts
/bin/
/goenv
goenv-*
*.exe

// No docs at root
/*.md

scripts/swap/swap

# Snyk Security Extension - AI Rules (auto-generated)
.github/instructions/snyk_rules.instructions.md
1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.23.2
116 changes: 116 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# GoReleaser configuration for goenv
# Documentation: https://goreleaser.com

version: 2

# Build configuration
builds:
- id: goenv
main: .
binary: goenv
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.buildTime={{.Date}}
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"
ignore:
# Windows on ARM is not commonly used for development
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
# FreeBSD ARM support is limited
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: arm64

# Archive configuration
archives:
- id: goenv
name_template: "goenv_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- completions/*
- docs/**/*

# Checksum configuration
checksum:
name_template: "goenv_{{ .Version }}_checksums.txt"
algorithm: sha256

# Snapshot configuration (for non-tagged builds)
snapshot:
name_template: "{{ incpatch .Version }}-dev"

# Changelog configuration
changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- typo
groups:
- title: "Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug Fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: "Enhancements"
regexp: "^.*enhance[(\\w)]*:+.*$"
order: 2
- title: "Others"
order: 999

# Release configuration
release:
github:
owner: go-nv
name: goenv
draft: false
prerelease: auto
mode: replace
header: |
## goenv {{ .Tag }}

**Installation:**

### Quick Binary Install (No Go Required!)

```bash
# Linux/macOS
curl -sfL https://raw.githubusercontent.com/go-nv/goenv/master/install.sh | bash

# Or download directly:
# Linux (x64): goenv_{{ .Version }}_linux_amd64.tar.gz
# Linux (ARM64): goenv_{{ .Version }}_linux_arm64.tar.gz
# macOS (Intel): goenv_{{ .Version }}_darwin_amd64.tar.gz
# macOS (M1/M2): goenv_{{ .Version }}_darwin_arm64.tar.gz
# Windows (x64): goenv_{{ .Version }}_windows_amd64.zip
```

### What's Changed
footer: |
**Full Changelog**: https://github.com/go-nv/goenv/compare/{{ .PreviousTag }}...{{ .Tag }}
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"golang.go"
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"go.useLanguageServer": true,
"makefile.configureOnOpen": false,
"go.toolsGopath": "${env:HOME}/go/tools",
"go.goroot": "${env:HOME}/.goenv/versions/1.23.2",
"go.gopath": "${env:HOME}/go/1.23.2"
}
Loading