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
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
Trevor Brown
160ca04444
Merge pull request #49 from asdf-vm/tb/info-command
...
feat(golang-rewrite): info command
2024-12-18 11:32:01 -05:00
Trevor Brown
3155dc374e
feat(golang-rewrite): version file parsing
...
* Create toolversions package
* Address linter errors for toolversions package
* Write tests
2024-12-18 11:32:01 -05:00
Trevor Brown
516be76ad5
Merge pull request #48 from asdf-vm/tb/plugin-callback-invocation
...
feat(golang-rewrite): create `RunCallback` method for `Plugin` struct
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
963c04c742
Merge pull request #45 from asdf-vm/tb/command-exec
...
feat(golang-rewrite): create hooks
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
cb813f65ef
Merge pull request #44 from asdf-vm/tb/use-plugin-index
...
feat(golang-rewrite): use plugin index
2024-12-18 11:32:01 -05:00
Trevor Brown
771f18493f
feat(golang-rewrite): create hooks
...
* Update tests for config package to use assert package
* Create Config.GetHook method
* Create execute package for running Bash commands
* Create hook package for running asdf hooks
* Run plugin add hooks
2024-12-18 11:32:01 -05:00
Trevor Brown
a5d7ebf8bc
Merge pull request #42 from asdf-vm/tb/git-code-refactor
...
feat(golang-rewrite): move all Git code to git package
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
89ec687da9
Merge pull request #40 from asdf-vm/tb/plugin-repository
...
feat(golang-rewrite): create pluginindex package
2024-12-18 11:32:01 -05:00
Trevor Brown
cb49b64a5a
feat(golang-rewrite): move all Git code to git package
...
* Move plugins/git package to /git.
* Update repoer interface in pluginindex package to match interface in git package
* Use git package's Repo struct in pluginindex package
2024-12-18 11:32:01 -05:00
Trevor Brown
0aba948c65
Merge pull request #36 from asdf-vm/tb/plugin-update-cmd
...
feat(golang-rewrite): create plugin update command
2024-12-18 11:32:01 -05:00
Trevor Brown
202cdae831
feat(golang-rewrite): create pluginindex package
...
* Switch to non-verbose test output in Makefile
* Create pluginindex package with PluginIndex struct with methods for updating index and retrieving plugin URLs
* Create IndexRepo interface to allow for easy testing out cloning real Git repository.
2024-12-18 11:32:01 -05:00
Trevor Brown
c4800443bd
feat(golang-rewrite): create plugin update command
2024-12-18 11:32:01 -05:00
Trevor Brown
a6a27e4812
Merge pull request #38 from asdf-vm/tb/setup-gofumpt
...
chore(golang-rewrite): setup gofumpt
2024-12-18 11:32:00 -05:00
Trevor Brown
636620524e
Merge pull request #35 from asdf-vm/tb/plugin-git-package
...
feat(golang-rewrite): create plugins/git package to store plugin Git operations
2024-12-18 11:32:00 -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
3ffeec2ea0
Merge pull request #33 from asdf-vm/tb/default-config-refactor
...
chore(golang-rewrite): default settings refactor
2024-12-18 11:32:00 -05:00
Trevor Brown
325cd3334b
feat(golang-rewrite): create plugins/git package to store plugin Git operations
2024-12-18 11:32:00 -05:00
Trevor Brown
e4c2b482a6
chore(golang-rewrite): rename files for plugins and cmd packages
2024-12-18 11:32:00 -05:00
Trevor Brown
0ce1de3834
chore(golang-rewrite): default settings refactor
2024-12-18 11:32:00 -05:00
Trevor Brown
037cf36dab
Merge pull request #32 from asdf-vm/tb/workflow-improvements
...
chore(golang-rewrite): Github workflow improvements
2024-12-18 11:32:00 -05:00
Trevor Brown
c10d22fa27
Merge pull request #31 from asdf-vm/tb/add-makefile
...
feat(golang-rewrite): create Makefile
2024-12-18 11:32:00 -05:00
Trevor Brown
5406f3eca1
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 11:32:00 -05:00
Trevor Brown
a3f16b24a1
Merge pull request #30 from asdf-vm/tb/plugin-remove-command
...
feat(golang-rewrite): create plugin remove command
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
4741147821
Merge pull request #29 from asdf-vm/tb/plugin-list-command
...
feat(golang-rewrite): create plugin list command
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
b49e01beee
Merge pull request #28 from asdf-vm/tb/plugin-add-command-2
...
feat(golang-rewrite): create pluginAddCommand function for plugin add command action
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
43f20587b5
Merge pull request #26 from asdf-vm/tb/plugin-add-command
...
feat(golang-rewrite): PluginAdd function
2024-12-18 11:32:00 -05:00
Trevor Brown
26b91aa828
feat(golang-rewrite): create pluginAddCommand function for plugin add command action
2024-12-18 11:32:00 -05:00