Skip to content

Commit c54c714

Browse files
committed
feat: implement a krm function registry
1 parent 7fc4d07 commit c54c714

15 files changed

+35
-602
lines changed

.github/workflows/lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ name: Lint
33
on:
44
push:
55
branches:
6-
- main
6+
- master
77
pull_request:
88

99
jobs:
1010
lint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: asdf-vm/actions/install@v2
1515
- run: scripts/lint.bash
1616

1717
actionlint:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Check workflow files
22-
uses: docker://rhysd/actionlint:1.6.23
22+
uses: docker://rhysd/actionlint:latest
2323
with:
2424
args: -color

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- main
6+
- master
77

88
permissions:
99
contents: write

.github/workflows/semantic-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: Semantic PR
22

33
on:
44
pull_request_target:
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
name: Build
1+
name: Test
22

33
on:
44
push:
55
branches:
6-
- main
6+
- master
77
pull_request:
88

99
jobs:
10-
plugin_test:
11-
name: asdf plugin test
10+
build:
1211
strategy:
1312
matrix:
1413
os:
@@ -19,4 +18,5 @@ jobs:
1918
- name: asdf_plugin_test
2019
uses: asdf-vm/actions/plugin-test@v2
2120
with:
22-
command: krm-functions --help
21+
command: image-updater -h
22+
version: image-updater-v1.0.0

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.tool-versions

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
shellcheck 0.9.0
2-
shfmt 3.6.0
2+
shfmt 3.7.0

README.md

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align="center">
22

3-
# asdf-krm-functions [![Build](https://github.com/imranismail/asdf-krm-functions/actions/workflows/build.yml/badge.svg)](https://github.com/imranismail/asdf-krm-functions/actions/workflows/build.yml) [![Lint](https://github.com/imranismail/asdf-krm-functions/actions/workflows/lint.yml/badge.svg)](https://github.com/imranismail/asdf-krm-functions/actions/workflows/lint.yml)
3+
# asdf-krm-function [![Test](https://github.com/imranismail/asdf-krm-function/actions/workflows/test.yml/badge.svg)](https://github.com/imranismail/asdf-krm-function/actions/workflows/test.yml) [![Lint](https://github.com/imranismail/asdf-krm-function/actions/workflows/lint.yml/badge.svg)](https://github.com/imranismail/asdf-krm-function/actions/workflows/lint.yml)
44

5-
[krm-functions](https://github.com/imranismail/asdf-krm-functions) plugin for the [asdf version manager](https://asdf-vm.com).
5+
[krm-function](https://github.com/imranismail/asdf-krm-function) plugin for the [asdf version manager](https://asdf-vm.com).
66

77
</div>
88

@@ -15,35 +15,32 @@
1515

1616
# Dependencies
1717

18-
**TODO: adapt this section**
19-
2018
- `bash`, `curl`, `tar`: generic POSIX utilities.
21-
- `SOME_ENV_VAR`: set this environment variable in your shell config to load the correct version of tool x.
2219

2320
# Install
2421

2522
Plugin:
2623

2724
```shell
28-
asdf plugin add krm-functions
25+
asdf plugin add krm-function
2926
# or
30-
asdf plugin add krm-functions https://github.com/imranismail/asdf-krm-functions.git
27+
asdf plugin add krm-function https://github.com/imranismail/asdf-krm-function.git
3128
```
3229

33-
krm-functions:
30+
krm-function:
3431

3532
```shell
3633
# Show all installable versions
37-
asdf list-all krm-functions
34+
asdf list-all krm-function
3835

3936
# Install specific version
40-
asdf install krm-functions latest
37+
asdf install krm-function latest
4138

4239
# Set a version globally (on your ~/.tool-versions file)
43-
asdf global krm-functions latest
40+
asdf global krm-function latest
4441

45-
# Now krm-functions commands are available
46-
krm-functions --help
42+
# Now krm-function commands are available
43+
krm-function --help
4744
```
4845

4946
Check [asdf](https://github.com/asdf-vm/asdf) readme for more instructions on how to
@@ -53,7 +50,7 @@ install & manage versions.
5350

5451
Contributions of any kind welcome! See the [contributing guide](contributing.md).
5552

56-
[Thanks goes to these contributors](https://github.com/imranismail/asdf-krm-functions/graphs/contributors)!
53+
[Thanks goes to these contributors](https://github.com/imranismail/asdf-krm-function/graphs/contributors)!
5754

5855
# License
5956

bin/download

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"
1717
download_release "$ASDF_INSTALL_VERSION" "$release_file"
1818

1919
# Extract contents of tar.gz file into the download directory
20-
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" --strip-components=1 || fail "Could not extract $release_file"
20+
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file"
2121

2222
# Remove the tar.gz file since we don't need to keep it
2323
rm "$release_file"

bin/latest-stable

-29
This file was deleted.

contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Testing Locally:
66
asdf plugin test <plugin-name> <plugin-url> [--asdf-tool-version <version>] [--asdf-plugin-gitref <git-ref>] [test-command*]
77

88
# TODO: adapt this
9-
asdf plugin test krm-functions https://github.com/imranismail/asdf-krm-functions.git "krm-functions --help"
9+
asdf plugin test krm-function https://github.com/imranismail/asdf-krm-function.git "krm-function --help"
1010
```
1111

1212
Tests are automatically run in GitHub Actions on push and PR.

krm-functions/image-updater/go.mod

-76
This file was deleted.

0 commit comments

Comments
 (0)