Commit Graph

1860 Commits

Author SHA1 Message Date
Your Name
ccc98ad4e9 feat(golang-rewrite): implement asdf plugin extension commands
* Enable `plugin_extension_command.bats` tests
* Add comment on `version_commands.bats` tests
* Show help output when asdf run with no arguments
* Document breaking change in asdf extension commands feature
* Create `Plugin.ExtensionCommandPath` method
* Create `asdf cmd` subcommand
* Get `plugin_extension_command.bats` tests passing
* Document breaking changes to asdf extension commands
2024-12-18 11:32:04 -05:00
Trevor Brown
82f19436c8 Merge pull request #89 from asdf-vm/tb/plugin-list-all-tests
feat(golang-rewrite): implement `asdf plugin list all` command
2024-12-18 11:32:03 -05:00
Trevor Brown
5e542da7b5 Merge pull request #88 from asdf-vm/tb/install-command-tests
feat(golang-rewrite): get all `install_command.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
e7df5ff325 feat(golang-rewrite): implement asdf plugin list all command
* Enable `plugin_list_all_command.bats` tests
* Create `PluginIndex.Get` method
* Create `asdf plugin list all` subcommand
* Extract plugin index repo URL into config package
* Fix failing tests
2024-12-18 11:32:03 -05:00
Trevor Brown
609d60686b Merge pull request #87 from asdf-vm/tb/more-shim-exec-fixes-2
feat(golang-rewrite): get remaining `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
b6ec89f95f feat(golang-rewrite): get all install_command.bats tests passing
* Enable `install_command.bats` tests
* Update `versions.InstallVersion` function to accept `toolversions.Version` struct
* Remove download directory after install if not configured to keep it
* Add download callback requirement to list of breaking changes
* Add `--keep-download` flag to install command
* Get all `install_command.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
e8cde35779 Merge pull request #86 from asdf-vm/tb/more-shim-exec-fixes
feat(golang-rewrite): more shim exec fixes
2024-12-18 11:32:03 -05:00
Trevor Brown
162cb8ecee feat(golang-rewrite): get remaining shim_exec.bats tests passing
* Disable custom shim template tests
* Document another breaking change
* Enable `shim_exec.bats` tests
* Fix bug in `shims.getCustomExecutablePath` function
* Pass default relative executable path as third argument to `exec-path` callback
* Get remaining `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
03bd11f7cf Merge pull request #83 from asdf-vm/tb/shim-exec-fixes
fix(golang-rewrite): `asdf exec` and `asdf env` command fixes
2024-12-18 11:32:03 -05:00
Trevor Brown
f639f8a4d0 feat(golang-rewrite): more shim exec fixes
* Create `toolversions.ParseSlice` function
* Create `toolversions.Format` function
* Refactor `shims` package to use `toolversions.Version` struct
* Fix handling of path versions in `shims.FindExecutable` function
2024-12-18 11:32:03 -05:00
Trevor Brown
f01233eaee Merge pull request #82 from asdf-vm/tb/shim-exec-env
feat(golang-rewrite): implement `asdf env` command
2024-12-18 11:32:03 -05:00
Trevor Brown
7dfa8b40ae fix(golang-rewrite): asdf exec and asdf env command fixes
* Create `CurrentEnv` and `MergeEnv` helper functions
* Add another test for `paths.RemoveFromPath` function
* Move executable finding functions to shims package
* Correct PATH code for env and exec commands
2024-12-18 11:32:03 -05:00
Trevor Brown
0e43521ea7 Merge pull request #81 from asdf-vm/tb/reshim-fix
fix(golang-rewrite): allow directories returned by list-bin-paths to be absent from the file system
2024-12-18 11:32:03 -05:00
Trevor Brown
26a3815948 feat(golang-rewrite): implement asdf env command
* Create `CallbackPath` method on `Plugin` struct
* Correct behavior of `asdf shimversions` command
* Update `shims.FindExecutable` function to return plugin
* Create `repotest.WritePluginCallback` function
* Create `execenv` package for invoking `exec-env` plugin callback
* Make `MapToSlice` a public function
* Return resolved version from `shims.FindExecutable` function
* Create `shims.ExecutablePaths` function
* Enable `shim_env_command.bats` tests
* Implement `asdf env` command
2024-12-18 11:32:03 -05:00
Trevor Brown
20a7f851a0 Merge pull request #80 from asdf-vm/tb/asdf-version-info-fix-2
feat(golang-rewrite): correct asdf-version workflow step to produce version as output (second attempt)
2024-12-18 11:32:03 -05:00
Trevor Brown
80ac9bb51c fix(golang-rewrite): allow directories returned by list-bin-paths to be absent from the file system
* create `repotest.WritePluginCallback` function
* add test for `list-bin-paths` callback that returns non-existent path
* if directory name returned by `list-bin-paths` doesn't exist skip it
2024-12-18 11:32:03 -05:00
Trevor Brown
1d83d64203 Merge pull request #79 from asdf-vm/tb/asdf-version-info-fix
feat(golang-rewrite): correct asdf-version workflow step to produce version as output
2024-12-18 11:32:03 -05:00
Trevor Brown
572ed07f2b feat(golang-rewrite): correct asdf-version workflow step to produce version as output 2024-12-18 11:32:03 -05:00
Trevor Brown
8eeb85ddcc Merge pull request #78 from asdf-vm/tb/asdf-version-info
feat(golang-rewrite): compile asdf version into Go binaries
2024-12-18 11:32:03 -05:00
Trevor Brown
19a0597502 feat(golang-rewrite): correct asdf-version workflow step to produce version as output 2024-12-18 11:32:03 -05:00
Trevor Brown
c1d8975f88 Merge pull request #77 from asdf-vm/tb/shim-exec-bats
feat(golang-rewrite): introduce `Version` struct, get some `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
6d708b2807 feat(golang-rewrite): compile asdf version into Go binaries
* Create asdf-version script to print formatted version
* Update Makefile to set main.version variable during build
* Improve help output formatting
* Update release-build workflow to set asdf version in binaries
2024-12-18 11:32:03 -05:00
Trevor Brown
9d9fc698f4 Merge pull request #76 from asdf-vm/tb/shim-versions-command
feat(golang-rewrite): create shimversions command
2024-12-18 11:32:03 -05:00
Trevor Brown
924eecfa6a feat(golang-rewrite): introduce Version struct, get some shim_exec.bats tests passing
* Get more shim_exec.bats tests passing by adding shebang lines to test scripts
* Disable shim_exec test case for scenario that is no longer possible
* Add documentation on another breaking change
* Create toolversions.Version struct and update code to use new struct
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
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
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