Commit Graph

12 Commits

Author SHA1 Message Date
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
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
f1e7c05ae3 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 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
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
dab4657784 feat(golang-rewrite): create Makefile
* Address Go linter warnings
* Fix Github workflow
2024-12-18 10:21:25 -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
b4710039e7 fix(golang-rewrite): comment out all BATS tests 2024-12-18 10:21:11 -05:00
Trevor Brown
4d5108c905 feat(golang-rewrite): set variables for bats integration tests 2024-12-18 10:21:11 -05:00
Trevor Brown
ff82d9787c feat(golang-rewrite): build golang asdf for BATS integration tests 2024-12-18 10:21:11 -05:00
Trevor Brown
3cc6d8d3bb feat(golang-rewrite): run bats integration tests in golang 2024-12-18 10:21:11 -05:00