fix: use macos compatible sed syntax #196
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
plugin-test: | |
name: asdf plugin test | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Run asdf plugin test | |
uses: asdf-vm/actions/plugin-test@v3 | |
with: | |
command: asdf-plugin-manager version | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Test asdf-plugin-manager plugin | |
run: | | |
asdf plugin add asdf-plugin-manager . | |
asdf install asdf-plugin-manager latest | |
asdf plugin list --urls --refs | |
asdf global asdf-plugin-manager latest | |
asdf plugin remove asdf-plugin-manager | |
- name: Copy sdf-plugin-manager cli | |
run: | | |
cp -a cli/asdf-plugin-manager.sh /usr/local/bin/asdf-plugin-manager | |
- name: Install | Test asdf-plugin-manager cli | |
working-directory: test | |
env: | |
ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME: .install.plugin-versions | |
run: | | |
set -euox pipefail | |
asdf-plugin-manager list | |
asdf-plugin-manager add-all | |
asdf plugin list --refs | |
# Validate. | |
PLUGIN_GIT_REF=$(grep -oE "[^ ]\w{6}$" test/.plugin-versions) | |
asdf plugin list --refs | grep "${PLUGIN_GIT_REF}" && | |
echo "[Passed] The plugin git ref in test/.plugin-versions matches the installed one." | |
- name: Update | Test asdf-plugin-manager cli | |
working-directory: test | |
env: | |
ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME: .update.plugin-versions | |
run: | | |
set -euox pipefail | |
asdf plugin list --refs | |
asdf-plugin-manager update-all | |
# Validate. | |
PLUGIN_GIT_URL"$(cat ${ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME} | awk '/^venom/ {print $2}')" | |
PLUGIN_GIT_REF_UPDATED="$(git ls-remote ${PLUGIN_GIT_URL} HEAD | head -c 7)" | |
asdf plugin list --refs | grep "${PLUGIN_GIT_REF_UPDATED}" | |
- name: Export | Test asdf-plugin-manager cli | |
working-directory: test | |
run: | | |
set -euox pipefail | |
asdf plugin add jq | |
asdf plugin list --refs --urls | | |
awk '{OFS = ","; print $1,$2,$4}' | tee asdf-plugin.csv | |
asdf-plugin-manager export | | |
awk '{OFS = ","; print $1,$2,$3}' | tee asdf-plugin-manager.csv | |
# Validate. | |
diff asdf-plugin.csv tee asdf-plugin-manager.csv | |
- name: Remove | Test asdf-plugin-manager cli | |
working-directory: test | |
run: | | |
set -euox pipefail | |
asdf plugin list | |
asdf-plugin-manager remove-all | |
# Validate. | |
test -z "$(asdf plugin list)" |