Commit Graph

15 Commits

Author SHA1 Message Date
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
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
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
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
447acd13d1 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 11:32:01 -05:00
Trevor Brown
778ab34a6f feat(golang-rewrite): create RunCallback method for Plugin struct
* Create `plugins.New` function, updating existing code to use it
* Add another test for `hook.Run` function
* Enable `plugin_add_command.bats` tests for Go implementation of asdf
* Add `RunCallback` method to `Plugin` struct
* Update `plugins.Add` function to run `post-plugin-add` plugin callback script
* Handle Bash expression and scripts properly in `execute` package so `$@` is always set
2024-12-18 11:32:01 -05:00
Trevor Brown
8394e858fe 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 11:32:01 -05:00
Trevor Brown
c85155f69d 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 11:32:00 -05:00
Trevor Brown
9097696a4f feat(golang-rewrite): create Makefile
* Address Go linter warnings
* Fix Github workflow
2024-12-18 11:32:00 -05:00
Trevor Brown
2b02f51fa1 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 11:32:00 -05:00
Trevor Brown
ad0907a74d 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 11:32:00 -05:00
Trevor Brown
163d6b4b46 fix(golang-rewrite): comment out all BATS tests 2024-12-18 11:32:00 -05:00
Trevor Brown
2951011090 feat(golang-rewrite): set variables for bats integration tests 2024-12-18 11:32:00 -05:00
Trevor Brown
477e9d5729 feat(golang-rewrite): build golang asdf for BATS integration tests 2024-12-18 11:32:00 -05:00
Trevor Brown
2fc8006490 feat(golang-rewrite): run bats integration tests in golang 2024-12-18 11:32:00 -05:00