add starter plugin version feature (Addresses Issue #166)#234
add starter plugin version feature (Addresses Issue #166)#234skotchpine wants to merge 4 commits intoasdf-vm:masterfrom skotchpine:plugin-version
Conversation
lib/commands/plugin-add.sh
Outdated
| exit 1 | ||
| else | ||
| if ! git clone "$source_url" "$plugin_path"; then | ||
| if git clone -b "$plugin_branch" "$source_url" "$plugin_path"; then |
There was a problem hiding this comment.
I guess you removed the ! un-intentionally, the script should fail if it's not able to clone the repo.
|
@skotchpine why branches rather than tags? |
|
@tomdavidson No reason. Why tags rather than branches? |
|
Why closed? Vendoring the plugins would be great. Branches just point to HEAD and are a moving target. In many cases tags vendor strong enough that a separate artifact registry is not needed. SCMs typically have built in features for tags https://github.com/asdf-vm/asdf/releases and there is an whole ecosystems of semver'd git tagged releases. |
|
Any chance we can get this PR re-opened? Or happy to open a fresh one if the original author is unwilling. Having some basic version locking would be great in order to prevent failures due to plugins being updated. In the meantime we have to use something a bit hackier like
the above code should work fine for tags as well given |
|
If this were to be reopened, I would like to lookup the default branch of the repo instead of assuming I need to finish #800 before we modify any of this too. |
|
@jthegedus great to see #800 has been merged! I took a look at it and AFAICT in order to get this one ready it sounds like we should be good to omit the else condition here and rely on a clone from the remote's default branch, wdyt? We'd love to get this change into a release, so if you think that's the right direction happy to look into this more. |
|
@theoretick Yes please! Initial install being either remote HEAD, remote or remote is (I think) enough dials to satisfy people. If you want to open a new PR I will happily review, extra points for tests ;) |
Allows user to specify version along with URL when adding plugin to lock to a specific version instead of always relying on HEAD. Relates to asdf-vm#234
|
Sorry for the delay! Opened #916 as follow-up with a relevant test |
Allows user to specify version along with URL when adding plugin to lock to a specific version instead of always relying on HEAD. Relates to asdf-vm#234
Allows user to specify version along with URL when adding plugin to lock to a specific version instead of always relying on HEAD. Relates to asdf-vm#234
Allows user to specify version along with URL when adding plugin to lock to a specific version instead of always relying on HEAD. Relates to asdf-vm#234
Allows user to specify version along with URL when adding plugin to lock to a specific version instead of always relying on HEAD. Relates to asdf-vm#234
Plugin Versioning
This isn't a finished product, but a first draft. It adds a versions to
plugin-addvia git branches. With this change,plguin-addtakes an optional third argument<git-branch>. If a branch is given and is notmaster, then the plugin is cloned to<plugin-name>-<git-branch>instead of<plugin-name>.