Commit Graph

1836 Commits

Author SHA1 Message Date
Trevor Brown
822e14c561 feat(golang-rewrite): create shimversions command
* Enable `shim_versions_command.bats` tests
* Create `asdf shimversions` command
2024-12-18 11:32:03 -05:00
Trevor Brown
5e61624690 Merge pull request #75 from asdf-vm/tb/upgrade-doc
feat(golang-rewrite): create version 0.14 to 0.15 upgrade guide
2024-12-18 11:32:03 -05:00
Trevor Brown
7f4208333e Merge pull request #74 from asdf-vm/tb/remove-command-bats
feat(golang-rewrite): more `asdf plugin remove` tests
2024-12-18 11:32:03 -05:00
Trevor Brown
53cd454474 feat(golang-rewrite): create version 0.14 to 0.15 upgrade guide 2024-12-18 11:32:03 -05:00
Trevor Brown
626bde0a97 feat(golang-rewrite): more asdf plugin remove tests
* Enable `remove_command.bats` tests
* Update `remove_command.bats` to use new command name
* Create `internal/data` package
* Use data package for install paths
* Get all asdf plugin remove command BATS tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
5ec4dbfd70 Merge pull request #73 from asdf-vm/tb/asdf-list-commands
feat(golang-rewrite): create `asdf list` and `asdf list all` commands
2024-12-18 11:32:02 -05:00
Trevor Brown
a0b079c903 Merge pull request #72 from asdf-vm/tb/asdf-uninstall-command
feat(golang-rewrite): create `asdf uninstall` command
2024-12-18 11:32:02 -05:00
Trevor Brown
8db188a702 feat(golang-rewrite): create asdf list and asdf list all commands
* Enable `asdf list` BATS tests
* Update list_command.bats code to use non-hyphenated version of list all command
* Implement `asdf list all` command
* Implement `asdf list` command
2024-12-18 11:32:02 -05:00
Trevor Brown
0c27d88987 Merge pull request #71 from asdf-vm/tb/asdf-where-command
feat(golang-rewrite): create `asdf where` command
2024-12-18 11:32:02 -05:00
Trevor Brown
3fd4a83975 feat(golang-rewrite): create asdf uninstall command
* Enable asdf uninstall BATS tests
* Create `toolversions.ParseFromCliArg` function
* Create `versions.Uninstall` function
* Update `ParseFromCliArg` function to handle latest version without optional filter value
* Create `asdf uninstall` command
* Comment out invalid test
* Address linter warnings
2024-12-18 11:32:02 -05:00
Trevor Brown
ec8985af8f Merge pull request #70 from asdf-vm/tb/asdf-help-command
feat(golang-rewrite): implement `asdf help` command
2024-12-18 11:32:02 -05:00
Trevor Brown
09d06ff125 feat(golang-rewrite): create asdf where command
* Move `versions.ParseString` function to the toolversions package
* Create `toolversions.FormatForFS` function
* use new `toolversions.FormatForFS` function
* Create `asdf where` command
* Enable BATS tests for `asdf where` command
2024-12-18 11:32:02 -05:00
Trevor Brown
bfed008f3e Merge pull request #68 from asdf-vm/tb/which-command
feat(golang-rewrite): create `asdf which` command
2024-12-18 11:32:02 -05:00
Trevor Brown
d94baceb18 feat(golang-rewrite): implement asdf help command
* Create help package
* Add help command
* Enable help command BATS tests
* Implement functions in help package
* Write tests
* Correct function call in `installPlugin` test helper in shims package
2024-12-18 11:32:02 -05:00
Trevor Brown
87ac4bfe4c Merge pull request #69 from asdf-vm/tb/build-release-binaries
feat(golang-rewrite): build dev release binaries
2024-12-18 11:32:02 -05:00
Trevor Brown
d2afb85eb8 feat(golang-rewrite): create asdf which command
* create asdf which command
* enable which_command.bats tests
* add more info to NoExecutableForPluginError
* Write tests for shims.GetExecutablePath function
* Use plugin `exec-path` callback when present to compute executable
path
2024-12-18 11:32:02 -05:00
Trevor Brown
e7268576ee Merge pull request #67 from asdf-vm/tb/current-command
feat(golang-rewrite): create `asdf current` command
2024-12-18 11:32:02 -05:00
Trevor Brown
bc05110159 feat(golang-rewrite): build dev release binaries
* Use `wangyoucao577/go-release-action@v1` to build Go binaries for releases
* set release tag for `go-release-action`
2024-12-18 11:32:02 -05:00
Trevor Brown
6c4df2af42 Merge pull request #66 from asdf-vm/tb/shim-exec-2
feat(golang-rewrite): create `asdf exec` command
2024-12-18 11:32:02 -05:00
Trevor Brown
b33ab6463c feat(golang-rewrite): create asdf current command
* Create asdf current command
* Correct output of asdf exec command when no command is provided
* Enable current_command.bats tests
* Fix current_command.bats test code
2024-12-18 11:32:02 -05:00
Trevor Brown
05b9c37232 Merge pull request #65 from asdf-vm/tb/shim-exec-1
feat(golang-rewrite): create `shims.FindExecutable` function for shim execution
2024-12-18 11:32:02 -05:00
Trevor Brown
b966ca6627 feat(golang-rewrite): create asdf exec command
* Add `rogpeppe/go-internal` as a dependency
* Create `exec.Exec` function
* Create asdf exec command
* Address linter warnings
2024-12-18 11:32:02 -05:00
Trevor Brown
631b0d8793 Merge pull request #64 from asdf-vm/tb/shim-generation-4
feat(golang-rewrite): use version type when generating shims
2024-12-18 11:32:02 -05:00
Trevor Brown
9f09f78ec0 feat(golang-rewrite): create shims.FindExecutable function for shim execution
* Create primitive `toolversions.Intersect` function
* Create `paths.RemoveFromPath` function
* Create `shims.FindExecutable` function
* Write tests
2024-12-18 11:32:02 -05:00
Trevor Brown
eb0e475772 Merge pull request #63 from asdf-vm/tb/shim-generation-3
feat(golang-rewrite): create installs and installtest packages to avoid circular dependency
2024-12-18 11:32:02 -05:00
Trevor Brown
5266ba581d feat(golang-rewrite): use version type when generating shims
* Generate shims after version install
* Enable `reshim_command.bats` tests
* Remove `update_command.bats` tests from main_test.go
* Update `installs` package functions to accept version type in addition to version value
* Update `versions.ParseString` function to handle path version
* Move invocation of hooks for reshim
* Update `asdf reshim` command so shims can be generated for path versions
2024-12-18 11:32:02 -05:00
Trevor Brown
05e0a4a57f Merge pull request #62 from asdf-vm/tb/reorganize-go-code
feat(golang-rewrite): re-organize Go code
2024-12-18 11:32:02 -05:00
Trevor Brown
be52d8f39c feat(golang-rewrite): create installs and installtest packages to avoid circular dependency
* Correct `go test` command in GitHub test workflow
* Update execute tests to work on Github Actions
* Check in `shims/testdata` directory
* Create `installtest` helper package
* Create `installs` package
2024-12-18 11:32:02 -05:00
Trevor Brown
74d741fc3f Merge pull request #61 from asdf-vm/tb/shim-generation-2
feat(golang-rewrite): shim generation 2
2024-12-18 11:32:02 -05:00
Trevor Brown
620c0d87e8 feat(golang-rewrite): re-organize Go code
* move most Go packages to internal directory
* update import paths
2024-12-18 11:32:02 -05:00
Trevor Brown
62c2ba18f4 Merge pull request #60 from asdf-vm/tb/shim-generation
feat(golang-rewrite): shim generation part 1
2024-12-18 11:32:02 -05:00
Trevor Brown
985c181118 feat(golang-rewrite): shim generation 2
* Rename `versions.Installed` function to `IsInstalled`
* Create `versions.Installed` function
* Create `shims.GenerateForPluginVersions` and `shims.GenerateAll` functions
* Address linter warnings
* Create asdf reshim command
* Run asdf hook from new `shims` functions
2024-12-18 11:32:02 -05:00
Trevor Brown
241485016d Merge pull request #59 from asdf-vm/tb/install-cmd-bats-tests
feat(golang-rewrite): more work to get `install_command.bats` test passing
2024-12-18 11:32:02 -05:00
Trevor Brown
18e21c9028 feat(golang-rewrite): shim generation part 1
* Add `x/sys` as a dependency
* Create `toolversions.Unique` function
* Create `shims` package with `ExecutablePaths`, `PluginExecutables`, `Write`, `GenerateForVersion` function
* Address linter warnings
2024-12-18 11:32:02 -05:00
Trevor Brown
c0963a38a6 feat(golang-rewrite): more work to get install_command.bats test passing
* Correct `logger.Printf` call
* Get `plugin_remove_command.bats` tests passing
* Enable plugin_remove_command BATS tests
* Create `versions.NoVersionSetError` struct
* Set `ASDF_CONCURRENCY` for install callbacks
2024-12-18 11:32:02 -05:00
Trevor Brown
99cabeaf37 Merge pull request #58 from asdf-vm/tb/bats-test-fixes
feat(golang-rewrite): BATS test fixes & `latest` command
2024-12-18 11:32:01 -05:00
Trevor Brown
45461e07ef Merge pull request #57 from asdf-vm/tb/install-command
feat(golang-rewrite): create install command
2024-12-18 11:32:01 -05:00
Trevor Brown
b23e5a320f feat(golang-rewrite): BATS test fixes & latest command
* Get asdf info BATS tests working
* Create `versions.Installed` function
* Update `versions.Latest` to return single version
* Implement `latest` asdf command
2024-12-18 11:32:01 -05:00
Trevor Brown
123162946c Merge pull request #56 from asdf-vm/tb/latest-version
feat(golang-rewrite): create versions.Latest function
2024-12-18 11:32:01 -05:00
Trevor Brown
8313ebca2d feat(golang-rewrite): create install command
* Create `versions.Install` function
* Create `versions.InstallVersion` function
* Create `versions.InstallAll` function
* Improve tests
* Create install command
2024-12-18 11:32:01 -05:00
Trevor Brown
a94d8a87fa Merge pull request #54 from asdf-vm/tb/asdf-install-cmd
feat(golang-rewrite): create `versions.InstallOneVersion` function
2024-12-18 11:32:01 -05:00
Trevor Brown
9f6a65f5dd feat(golang-rewrite): create versions.Latest function
* Create `versions.ListAll` function
* Create `versions.Latest` function
* Update `versions.InstallOneVersion` to install latest version
2024-12-18 11:32:01 -05:00
Trevor Brown
ef91474538 Merge pull request #53 from asdf-vm/tb/full-version-resolution
feat(golang-rewrite): full version resolution
2024-12-18 11:32:01 -05:00
Trevor Brown
65688915a5 feat(golang-rewrite): create versions.InstallOneVersion function
* Create Plugin.Exists method
* Create internal/versions package
* Add missing asdfrc for internal/resolve package tests
* Create versions.ParseString function
* Create versions.InstallOneVersion function
* Update hook package to allow hook output to be received
* Write tests
2024-12-18 11:32:01 -05:00
Trevor Brown
13fbec2ad8 Merge pull request #52 from asdf-vm/tb/version-resolution
feat(golang-rewrite): create internal/resolve package
2024-12-18 11:32:01 -05:00
Trevor Brown
bd7ab9ae08 feat(golang-rewrite): full version resolution
* Refactor config package so default settings are always used with config file not loaded
* Update `findVersionsInDir` to check legacy files
* Refactor functions in internal/resolve package to return `ToolVersion` structs instead of version slices
* Refactor `findVersionsInEnv` function to return env variable name
* Create `resolve.Version` function
2024-12-18 11:32:01 -05:00
Trevor Brown
daba8249a2 Merge pull request #51 from asdf-vm/tb/offline-tests
feat(golang-rewrite): offline Go tests
2024-12-18 11:32:01 -05:00
Trevor Brown
c2e5ee6525 feat(golang-rewrite): create internal/resolve package
* Create `resolve` package
* Create `FindVersionsInDir`, `findVersionsInEnv`, and `findVersionsInLegacyFile` functions in resolve package
* Create `LegacyFilenames` and `ParseLegacyVersionFile` methods for Plugin
2024-12-18 11:32:01 -05:00
Trevor Brown
2e185a0e5b Merge pull request #50 from asdf-vm/tb/version-file-parsing
feat(golang-rewrite): version file parsing
2024-12-18 11:32:01 -05:00
Trevor Brown
f74efbf1bf feat(golang-rewrite): offline Go tests
Some of the Go tests actually cloned remote repos, which meant slow tests, and tests failures if I was working offline. These changes allow all Go tests to run offline. The test code now clones local Git repos instead of remotes ones.

* Add otiai10/copy as a dependency
* Create repotest package for test code that needs to work with Git repos
* Add back missing test script for execute package
* Update git, pluginindex, and plugins package tests so they work offline
2024-12-18 11:32:01 -05:00