Skip to content

Commit ef6a680

Browse files
committed
ci: auto update version in readme and cli
1 parent 84d33ae commit ef6a680

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ jobs:
1616
- macos-latest
1717
runs-on: ${{ matrix.os }}
1818
steps:
19-
- name: Run asdf plugin test
20-
uses: asdf-vm/actions/plugin-test@v3
19+
- name: Install asdf and run plugin test
20+
uses: asdf-vm/actions/plugin-test@v4
2121
with:
2222
command: asdf-plugin-manager version
23+
- name: Print asdf version
24+
run: |
25+
asdf version
2326
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2427
- name: Test asdf-plugin-manager plugin
2528
run: |
2629
asdf plugin add asdf-plugin-manager .
2730
asdf install asdf-plugin-manager latest
2831
asdf plugin list --urls --refs
29-
asdf global asdf-plugin-manager latest
32+
asdf set asdf-plugin-manager latest
3033
asdf plugin remove asdf-plugin-manager
3134
- name: Setup asdf-plugin-manager cli
3235
run: |
@@ -41,7 +44,7 @@ jobs:
4144
asdf-plugin-manager add-all
4245
asdf plugin list --refs
4346
# Validate.
44-
# I should install the managed plugin with the correct git ref.
47+
# It should install the managed plugin with the correct git ref.
4548
PLUGIN_GIT_REF="$(grep -oE "[^ ]\w{6}$" "${ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME}")"
4649
asdf plugin list --refs | grep "${PLUGIN_GIT_REF}"
4750
echo "[Passed] The plugin git ref in ${ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME} matches the installed one."

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@ jobs:
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
run: |
38-
sed -i "s/__VERSION__/$(cat version.txt)/g" cli/asdf-plugin-manager.sh
3938
cp -a cli/asdf-plugin-manager.sh asdf-plugin-manager-${{ steps.release.outputs.tag_name }}.sh
4039
gh release upload ${{ steps.release.outputs.tag_name }} asdf-plugin-manager-${{ steps.release.outputs.tag_name }}.sh

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,28 @@ Since the release of ASDF `v0.16.0` there have been a number of [breaking change
6767
6868
First, setup `asdf-plugin-manager` as asdf plugin in asdf:
6969

70+
<!-- x-release-please-start-version -->
7071
```shell
7172
asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git
7273
# Pin the asdf-plugin-manager version using git tag or even better using git hash which is immutable.
7374
asdf plugin update asdf-plugin-manager v1.3.1
7475
```
76+
<!-- x-release-please-end -->
7577

7678
Then, install the actual `asdf-plugin-manager` CLI:
7779

80+
<!-- x-release-please-start-version -->
7881
```shell
7982
# Install specific version
8083
asdf install asdf-plugin-manager 1.3.1
8184

82-
# Set a version globally (on your ~/.tool-versions file)
83-
asdf global asdf-plugin-manager 1.3.1
85+
# Set the plugin version (on your ~/.tool-versions file)
86+
asdf set asdf-plugin-manager 1.3.1
8487

8588
# Now asdf-plugin-manager command is available
8689
asdf-plugin-manager version
8790
```
91+
<!-- x-release-please-end -->
8892

8993
# Example
9094

cli/asdf-plugin-manager.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ set -eo pipefail
66
# Vars.
77
#
88

9-
VERSION=__VERSION__
9+
# x-release-please-start-version
10+
VERSION=1.4.0
11+
# x-release-please-end
1012
PLUGIN_VERSIONS_FILENAME="${ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME:-.plugin-versions}"
1113
ADD_CLEAN="${ASDF_PLUGIN_MANAGER_ADD_CLEAN:-FALSE}"
1214
PLUGINS_REPOS_DIR="$(asdf info | grep ASDF_DATA_DIR | cut -d"=" -f2)/plugins"

release-please-config.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,25 @@
3535
"type": "refactor",
3636
"section": "Refactors",
3737
"hidden": false
38+
},
39+
{
40+
"type": "ci",
41+
"section": "CI/CD",
42+
"hidden": false
3843
}
3944
],
4045
"packages": {
41-
".": {}
46+
".": {
47+
"extra-files": [
48+
{
49+
"type": "generic",
50+
"path": "README.md"
51+
},
52+
{
53+
"type": "generic",
54+
"path": "cli/asdf-plugin-manager.sh"
55+
}
56+
]
57+
}
4258
}
4359
}

0 commit comments

Comments
 (0)