File tree Expand file tree Collapse file tree 6 files changed +33
-8
lines changed Expand file tree Collapse file tree 6 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 2020 uses : asdf-vm/actions/plugin-test@v2
2121 with :
2222 command : oasdiff --help
23+ - name : asdf_plugin_test_1_10_23
24+ uses : asdf-vm/actions/plugin-test@v2
25+ with :
26+ command : oasdiff --version
27+ version : 1.10.23
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set -euo pipefail
55current_script_path=${BASH_SOURCE[0]}
66plugin_dir=$( dirname " $( dirname " $current_script_path " ) " )
77
8- # shellcheck source=../ lib/utils.bash
8+ # shellcheck source=lib/utils.bash
99source " ${plugin_dir} /lib/utils.bash"
1010
1111mkdir -p " $ASDF_DOWNLOAD_PATH "
@@ -17,7 +17,7 @@ release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"
1717download_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
2323rm " $release_file "
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set -euo pipefail
55current_script_path=${BASH_SOURCE[0]}
66plugin_dir=$( dirname " $( dirname " $current_script_path " ) " )
77
8- # shellcheck source=../ lib/utils.bash
8+ # shellcheck source=lib/utils.bash
99source " ${plugin_dir} /lib/utils.bash"
1010
1111install_version " $ASDF_INSTALL_TYPE " " $ASDF_INSTALL_VERSION " " $ASDF_INSTALL_PATH "
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set -euo pipefail
55current_script_path=${BASH_SOURCE[0]}
66plugin_dir=$( dirname " $( dirname " $current_script_path " ) " )
77
8- # shellcheck source=../ lib/utils.bash
8+ # shellcheck source=lib/utils.bash
99. " ${plugin_dir} /lib/utils.bash"
1010
1111curl_opts=(-sI)
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set -euo pipefail
55current_script_path=${BASH_SOURCE[0]}
66plugin_dir=$( dirname " $( dirname " $current_script_path " ) " )
77
8- # shellcheck source=../ lib/utils.bash
8+ # shellcheck source=lib/utils.bash
99source " ${plugin_dir} /lib/utils.bash"
1010
1111list_all_versions | sort_versions | xargs echo
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- ] GH_REPO=" https://github.com/tufin /oasdiff"
5+ GH_REPO=" https://github.com/Tufin /oasdiff"
66TOOL_NAME=" oasdiff"
77TOOL_TEST=" oasdiff --help"
88
@@ -36,17 +36,37 @@ list_all_versions() {
3636}
3737
3838download_release () {
39- local version filename url
39+ local version filename url platform
4040 version=" $1 "
4141 filename=" $2 "
42+ platform=$( get_platform " $version " )
4243
4344 # TODO: Adapt the release URL convention for oasdiff
44- url=" $GH_REPO /archive/ v${version} .tar.gz"
45+ url=" $GH_REPO /releases/download/ v${version} / ${TOOL_NAME} _ ${version} _ $platform .tar.gz"
4546
4647 echo " * Downloading $TOOL_NAME release $version ..."
4748 curl " ${curl_opts[@]} " -o " $filename " -C - " $url " || fail " Could not download $url "
4849}
4950
51+ get_platform () {
52+ local version=$1
53+
54+ case $( uname) in
55+ # Linux OS
56+ Linux)
57+ if [ " $( uname -m) " = " aarch64" ]; then
58+ echo " linux_arm64"
59+ else
60+ echo " linux_amd64"
61+ fi
62+ ;;
63+ # Mac OS
64+ Darwin)
65+ echo " darwin_all"
66+ ;;
67+ esac
68+ }
69+
5070install_version () {
5171 local install_type=" $1 "
5272 local version=" $2 "
You can’t perform that action at this time.
0 commit comments