generated from asdf-vm/asdf-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d198bd7
Showing
40 changed files
with
1,193 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{md,yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 |
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,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "" | ||
labels: bug | ||
assignees: "" | ||
--- | ||
|
||
**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. --> |
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,23 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: enhancement | ||
assignees: "" | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
|
||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> | ||
|
||
**Describe the solution you'd like** | ||
|
||
<!-- A clear and concise description of what you want to happen. --> | ||
|
||
**Describe alternatives you've 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. --> |
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. |
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 @@ | ||
version: 2 | ||
updates: | ||
# dependabot for GitHub Actions for this repo | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
# dependabot for GitHub Actions for the template | ||
- package-ecosystem: "github-actions" | ||
directory: "template/.github/" | ||
schedule: | ||
interval: "weekly" |
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,47 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: template setup test | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Run Template Setup | ||
run: | | ||
git config user.name "Foo Bearer" | ||
./setup.bash \ | ||
"asdf-foo" \ | ||
"foo --help" \ | ||
"asdf-community" \ | ||
"ASDF Community" \ | ||
"https://github.com/asdf-vm/asdf" \ | ||
"https://asdf-vm.com" \ | ||
"Apache-2.0" \ | ||
"yes" | ||
- name: Check setup result | ||
run: | | ||
set -xe | ||
ls -la . | ||
git log | ||
test ! -d template/ | ||
grep "Apache" LICENSE | ||
test "main" = "$(git rev-parse --abbrev-ref HEAD)" | ||
! git grep -F -e "<YOUR TOOL>" \ | ||
--or -e "<TOOL HOMEPAGE>" \ | ||
--or -e "<TOOL REPO>" \ | ||
--or -e "<TOOL CHECK>" \ | ||
--or -e "<YOUR NAME>" \ | ||
--or -e"<YOUR GITHUB USERNAME>" |
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,24 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: asdf-vm/actions/install@v3 | ||
- run: scripts/lint.bash | ||
|
||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check workflow files | ||
uses: docker://rhysd/actionlint:1.6.23 | ||
with: | ||
args: -color |
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 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
semantic-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
validateSingleCommit: true |
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,2 @@ | ||
shellcheck 0.9.0 | ||
shfmt 3.6.0 |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 The asdf-vm core AUTHORS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,36 @@ | ||
# asdf-plugin-template [![Build](https://github.com/asdf-vm/asdf-plugin-template/actions/workflows/build.yml/badge.svg)](https://github.com/asdf-vm/asdf-plugin-template/actions/workflows/build.yml) [![Lint](https://github.com/asdf-vm/asdf-plugin-template/actions/workflows/lint.yml/badge.svg)](https://github.com/asdf-vm/asdf-plugin-template/actions/workflows/lint.yml) | ||
|
||
This is an [asdf-vm plugin](https://asdf-vm.com/#/plugins-create) template with CI to run [Shellcheck](https://github.com/koalaman/shellcheck) and testing with the [asdf test GitHub Action](https://github.com/asdf-vm/actions). | ||
|
||
## Usage | ||
|
||
1. [Generate](https://github.com/asdf-vm/asdf-plugin-template/generate) a new repository based on this template. | ||
1. Clone it and run `bash setup.bash`. | ||
1. Force push to your repo: `git push --force-with-lease`. | ||
1. Adapt your code at the TODO markers. To find the markers: `git grep TODO`. | ||
1. To develop your plugin further, please read [the plugins create section of the docs](https://asdf-vm.com/plugins/create.html). | ||
|
||
>A feature of this plugin-template when hosted on GitHub is the use of [release-please](https://github.com/googleapis/release-please), an automated release tool. It leverages [Conventional Commit messages](https://www.conventionalcommits.org/) to determine semver release type, see the [documentation](https://github.com/googleapis/release-please). | ||
## Contributing | ||
|
||
Contributions welcome! | ||
|
||
1. Install `asdf` tools | ||
|
||
```shell | ||
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git | ||
asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git | ||
asdf install | ||
``` | ||
|
||
1. Develop! | ||
|
||
1. Lint & Format | ||
|
||
```shell | ||
./scripts/format.bash | ||
./scripts/lint.bash | ||
``` | ||
|
||
1. PR 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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# format this repo | ||
shfmt --language-dialect bash --write \ | ||
setup.bash \ | ||
scripts/*.bash | ||
|
||
# format the template/ | ||
shfmt --language-dialect bash --write \ | ||
template/**/* |
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# lint this repo | ||
shellcheck --shell=bash --external-sources \ | ||
setup.bash \ | ||
scripts/* | ||
|
||
shfmt --language-dialect bash --diff \ | ||
setup.bash \ | ||
scripts/* | ||
|
||
# lint the template/ | ||
shellcheck --shell=bash --external-sources \ | ||
template/bin/* --source-path=template/lib/ \ | ||
template/lib/* \ | ||
template/scripts/* | ||
|
||
shfmt --language-dialect bash --diff \ | ||
template/**/* |
Oops, something went wrong.