Commit Graph

21 Commits

Author SHA1 Message Date
Trevor Brown
f69d16c2fd 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 10:21:42 -05:00
Trevor Brown
c86e84fffb 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 10:21:41 -05:00
Trevor Brown
e10dae7dc6 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 10:21:41 -05:00
Trevor Brown
54552f91bf 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 10:21:41 -05:00
Trevor Brown
f1cec5574a 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 10:21:41 -05:00
Trevor Brown
ec1fe94311 feat(golang-rewrite): re-organize Go code
* move most Go packages to internal directory
* update import paths
2024-12-18 10:21:41 -05:00
Trevor Brown
030b294234 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 10:21:41 -05:00
Trevor Brown
fd4401494d 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 10:21:41 -05:00
Trevor Brown
040df16084 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 10:21:41 -05:00
Trevor Brown
2de83c2ae1 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 10:21:41 -05:00
Trevor Brown
f657055832 feat(golang-rewrite): info command
* Implement info command
* Remove duplicate and unneeded BATS tests from `main_test.go`
* remove download dir for plugin when removing plugin
* update plugins.Add function so downloads directory is created
2024-12-18 10:21:41 -05:00
Trevor Brown
1785ed8d20 feat(golang-rewrite): use plugin index
* Create `pluginindex.Build` function
* Use `pluginindex` when no plugin URL provided for plugin add command
* Get more `plugin_add_command` BATS tests passing against Golang version
* Only use `pluginindex` when it is not disabled
* Update error message so it matches legacy format
* Add staticcheck.conf
2024-12-18 10:21:41 -05:00
Trevor Brown
4c0d5893c0 feat(golang-rewrite): create plugin update command 2024-12-18 10:21:41 -05:00
Trevor Brown
b8d13190ed chore(golang-rewrite): setup gofumpt
* Install and run gofumpt in Golang lint workflow
* Remove golangci-lint
* Run gofumpt and fix revive linter errors
2024-12-18 10:21:41 -05:00
Trevor Brown
52a7c7a432 chore(golang-rewrite): rename files for plugins and cmd packages 2024-12-18 10:21:27 -05:00
Trevor Brown
cfd7e0d046 chore(golang-rewrite): Github workflow improvements
* Add golangci-lint to lint workflow
* Remove failing Bash test jobs
* Add golangci lint config
* Fix revive command in Makefile
* Fix revive warnings
2024-12-18 10:21:27 -05:00
Trevor Brown
b1f1414e4d feat(golang-rewrite): create plugin remove command
* Simplify BATS test Golang code
* Update plugin add test to new command format
* Correctly set `ASDF_DATA_DIR` for BATS tests
* Rename `PluginAdd` function to `Add`
* Create `plugin.Remove` function
* Make plugin remove command invoke `plugin.Remove` function
2024-12-18 10:21:11 -05:00
Trevor Brown
6d01b38abc feat(golang-rewrite): create plugin list command
* remove underscores from function names (addresses warnings from revive linter)
* create installMockPluginRepo function
* implement plugin list command
2024-12-18 10:21:11 -05:00
Trevor Brown
db5db87322 feat(golang-rewrite): create pluginAddCommand function for plugin add command action 2024-12-18 10:21:11 -05:00
Trevor Brown
2e4e4cd879 feat(golang-rewrite): add placeholders for plugin subcommands
* Switch from cobra to urfave/cli
* Create placeholder plugin command structs
2024-12-18 10:21:11 -05:00
Trevor Brown
7a72ce60ac feat(golang-rewrite): create settings and config structs for loading config
* rename commands package to cmd
* add go-ini as a dependency
* write code to parse asdfrc file into Settings struct
* add go-envconfig as a dependency
* add go-homedir as a dependency
* implement first version of LoadConfig function to load environment variables into Config struct
2024-12-18 10:21:11 -05:00