-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support generating gitlab hosted plugins (#24)
- Loading branch information
Showing
9 changed files
with
291 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
image: debian:10 | ||
|
||
stages: | ||
- lint | ||
- test | ||
|
||
variables: | ||
PLUGIN_NAME: asdf-<YOUR TOOL> | ||
TOOL_CHECK: <TOOL CHECK> | ||
SHELLCHECK_VERSION: stable | ||
|
||
asdf-plugin-lint: | ||
stage: lint | ||
before_script: | ||
- apt update && apt install -y xz-utils wget | ||
- wget -qO- https://github.com/koalaman/shellcheck/releases/download/$SHELLCHECK_VERSION/shellcheck-$SHELLCHECK_VERSION.linux.x86_64.tar.xz | tar xJv | ||
- cp shellcheck-$SHELLCHECK_VERSION/shellcheck /usr/bin | ||
script: | ||
- shellcheck -x bin/* -P lib/ | ||
|
||
asdf-plugin-test: | ||
stage: test | ||
before_script: | ||
- apt update && apt install -y git curl bsdmainutils file | ||
- git clone https://github.com/asdf-vm/asdf.git | ||
- . asdf/asdf.sh | ||
script: | ||
- asdf plugin-add $PLUGIN_NAME $CI_REPOSITORY_URL | ||
- asdf list-all $PLUGIN_NAME | ||
- asdf plugin test $PLUGIN_NAME $CI_REPOSITORY_URL --asdf-plugin-gitref $CI_COMMIT_REF_NAME "$TOOL_CHECK" || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Describe the bug | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
## Steps to reproduce | ||
|
||
<!-- Steps to reproduce the behavior: --> | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Screenshots | ||
|
||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context about the problem here. --> | ||
|
||
/label ~bug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Feature description | ||
|
||
- [ ] Is this feature the result of a problem? | ||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> | ||
|
||
## Desired solution | ||
|
||
<!-- A clear and concise description of what you want to happen. --> | ||
|
||
## Alternatives considered | ||
|
||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> | ||
|
||
/label ~"feature request" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Description | ||
|
||
<!--- Describe your changes in detail --> | ||
|
||
## Motivation and Context | ||
|
||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
|
||
## Types of changes | ||
|
||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
|
||
## Usage examples | ||
|
||
<!--- Provide examples of intended usage --> | ||
|
||
## How Has This Been Tested? | ||
|
||
<!--- Please describe in detail how you tested your changes. --> | ||
|
||
## Checklist: | ||
|
||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
|
||
- [ ] I have updated the documentation accordingly. | ||
- [ ] I have added tests to cover my changes. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<div align="center"> | ||
|
||
# asdf-<YOUR TOOL> ![Build Status](https://gitlab.com/<YOUR GITLAB USERNAME>/asdf-<YOUR TOOL>/badges/<PRIMARY BRANCH>/pipeline.svg) | ||
|
||
[<YOUR TOOL>](<TOOL HOMEPAGE>) plugin for the [asdf version manager](https://asdf-vm.com). | ||
|
||
</div> | ||
|
||
# Contents | ||
|
||
- [Dependencies](#dependencies) | ||
- [Install](#install) | ||
- [Why?](#why) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
|
||
# Dependencies | ||
|
||
- `bash`, `curl`, `tar`: generic POSIX utilities. | ||
- `SOME_ENV_VAR`: set this environment variable in your shell config to load the correct version of tool x. | ||
|
||
# Install | ||
|
||
Plugin: | ||
|
||
```shell | ||
asdf plugin add <YOUR TOOL> | ||
# or | ||
asdf plugin add https://gitlab.com/<YOUR GITLAB USERNAME>/asdf-<YOUR TOOL>.git | ||
``` | ||
|
||
<YOUR TOOL>: | ||
|
||
```shell | ||
# Show all installable versions | ||
asdf list-all <YOUR TOOL> | ||
|
||
# Install specific version | ||
asdf install <YOUR TOOL> latest | ||
|
||
# Set a version globally (on your ~/.tool-versions file) | ||
asdf global <YOUR TOOL> latest | ||
|
||
# Now <YOUR TOOL> commands are available | ||
<TOOL CHECK> | ||
``` | ||
|
||
Check [asdf](https://github.com/asdf-vm/asdf) readme for more instructions on how to | ||
install & manage versions. | ||
|
||
# Contributing | ||
|
||
Contributions of any kind welcome! See the [contributing guide](contributing.md). | ||
|
||
[Thanks goes to these contributors](https://gitlab.com/<YOUR GITLAB USERNAME>/asdf-<YOUR TOOL>/-/graphs/<PRIMARY BRANCH>)! | ||
|
||
# License | ||
|
||
See [LICENSE](LICENSE) © [<YOUR NAME>](https://gitlab.com/<YOUR GITLAB USERNAME>/) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Contributing | ||
|
||
Testing Locally: | ||
|
||
```shell | ||
asdf plugin test <plugin-name> <plugin-url> [--asdf-tool-version <version>] [--asdf-plugin-gitref <git-ref>] [test-command*] | ||
|
||
# | ||
asdf plugin test <YOUR TOOL> https://gitlab.com/<YOUR GITLAB USERNAME>/asdf-<YOUR TOOL>.git "<TOOL CHECK>" | ||
``` | ||
|
||
Tests are automatically run in GitLab CI on push and merge request. |