Skip to content

Commit

Permalink
gh-release with extra flags
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbraun89 authored Sep 30, 2023
1 parent 6459f1c commit cceee65
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions feature_definitions/gh-release/feature-definition.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "gh-release",
"version": "1.0.22",
"version": "1.0.23",
"name": "Github Release",
"documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/gh-release",
"description": "Github Release feature will download, extract and add to path a release binary from a given repo",
Expand Down Expand Up @@ -63,11 +63,22 @@
"/usr/local/lib"
],
"type": "string"
},
"additionalFlags": {
"default": "",
"description": "(Optional) Any additional flags for the 'nanolayer install gh-release' command ",
"proposals": [
"--no-filter-assets-by-platform",
"--no-filter-assets-by-architecture",
"--no-filter-assets-by-distro",
"--no-filter-assets-by-misc"
],
"type": "string"
}
},
"installsAfter": [],
"dependencies": [],
"install_command": "release_tag_regex=$(if ! [ -z $RELEASETAGREGEX ]; then echo --release-tag-regex \"${RELEASETAGREGEX}\" ; fi)\nasset_regex_cmd=$(if ! [ -z $ASSETREGEX ]; then echo --asset-regex \"${ASSETREGEX}\" ; fi)\nlib_name_cmd=$(if ! [ -z $LIBNAME ]; then echo --lib-name \"${LIBNAME}\" ; fi)\n$nanolayer_location \\\n install gh-release \\\n \"$REPO\" \\\n \"$BINARYNAMES\" --force \\\n --version \"$VERSION\" --bin-location \"$BINLOCATION\" --lib-location \"$LIBLOCATION\" $asset_regex_cmd $lib_name_cmd $release_tag_regex",
"install_command": "release_tag_regex=$(if ! [ -z $RELEASETAGREGEX ]; then echo --release-tag-regex \"${RELEASETAGREGEX}\" ; fi)\nasset_regex_cmd=$(if ! [ -z $ASSETREGEX ]; then echo --asset-regex \"${ASSETREGEX}\" ; fi)\nlib_name_cmd=$(if ! [ -z $LIBNAME ]; then echo --lib-name \"${LIBNAME}\" ; fi)\n$nanolayer_location \\\n install gh-release \\\n \"$REPO\" \\\n \"$BINARYNAMES\" --force \\\n --version \"$VERSION\" --bin-location \"$BINLOCATION\" --lib-location \"$LIBLOCATION\" $asset_regex_cmd $lib_name_cmd $release_tag_regex $ADDITIONALFLAGS",
"test_scenarios": [
{
"name": "test_defaults_debian",
Expand Down Expand Up @@ -130,6 +141,20 @@
"binaryNames": "pwsh",
"assetRegex": "^(?!.*(fxdependent))"
}
},
{
"name": "test_apiops",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"test_commands": [
"type extractor"
],
"options": {
"version": "latest",
"repo": "Azure/apiops",
"binaryNames": "extractor",
"assetRegex": "^extractor\\.linux-.+\\.exe$",
"additionalFlags": "--no-filter-assets-by-platform"
}
}
]
}

0 comments on commit cceee65

Please sign in to comment.