Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 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
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.

10 changes: 7 additions & 3 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ 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
run: make build
- name: Run Unit Tests
run: make test
env:
Expand Down
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
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.24.4",
"go.gopath": "${env:HOME}/go/1.24.4"
}
Loading