Skip to content

Commit 8195493

Browse files
feat: bump nanolayer to 0.4.16 in gh-release
1 parent 3ce6828 commit 8195493

4 files changed

Lines changed: 19 additions & 12 deletions

File tree

src/gh-release/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ Github Release feature will download, extract and add to path a release binary f
1616
| Options Id | Description | Type | Default Value |
1717
|-----|-----|-----|-----|
1818
| repo | Select the version of the github release binary to install. | string | - |
19-
| target | The target binary name. For example, for Github CLI the binary name would be 'gh'. For DigitalOcean CLI: 'doctl', etc. | string | - |
19+
| binaryName | The target binary name. For example, for Github CLI the binary name would be 'gh'. For DigitalOcean CLI: 'doctl', etc. | string | - |
2020
| version | Select the version of the github release binary to install. | string | latest |
2121
| binLocation | Location to download the target binary to. Typically a location which exist under PATH variable | string | /usr/local/bin |
22-
| libLocation | Location to download the any lib files into (if exists) to. | string | /usr/local/lib |
22+
| libLocation | Any lib files (if exists) will be downloaded into this location. The binary will then be soft linked from the lib location to the bin location | string | /usr/local/lib |
23+
| libName | Name for the lib dir (if exists). Will default to binary name if not given | string | - |
2324
| assetRegex | An optional filtering regex to help point the correct release asset. | string | - |
2425

2526

src/gh-release/devcontainer-feature.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "gh-release",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"name": "Github Release",
55
"documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/gh-release",
66
"description": "Github Release feature will download, extract and add to path a release binary from a given repo",
@@ -15,7 +15,7 @@
1515
],
1616
"type": "string"
1717
},
18-
"target": {
18+
"binaryName": {
1919
"default": "",
2020
"description": "The target binary name. For example, for Github CLI the binary name would be 'gh'. For DigitalOcean CLI: 'doctl', etc.",
2121
"proposals": [
@@ -42,12 +42,17 @@
4242
},
4343
"libLocation": {
4444
"default": "/usr/local/lib",
45-
"description": "Location to download the any lib files into (if exists) to.",
45+
"description": "Any lib files (if exists) will be downloaded into this location. The binary will then be soft linked from the lib location to the bin location",
4646
"proposals": [
4747
"/usr/local/lib"
4848
],
4949
"type": "string"
5050
},
51+
"libName": {
52+
"default": "",
53+
"description": "Name for the lib dir (if exists). Will default to binary name if not given",
54+
"type": "string"
55+
},
5156
"assetRegex": {
5257
"default": "",
5358
"description": "An optional filtering regex to help point the correct release asset.",

src/gh-release/install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ source ./library_scripts.sh
99
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
1010
# and if missing - will download a temporary copy that automatically get deleted at the end
1111
# of the script
12-
ensure_nanolayer nanolayer_location "v0.4.14"
12+
ensure_nanolayer nanolayer_location "v0.4.16"
1313

1414

1515

1616

1717
asset_regex_cmd=$(if ! [[ -z $ASSETREGEX ]]; then echo --asset-regex "${ASSETREGEX}" ; fi)
18+
lib_name_cmd=$(if ! [[ -z $LIBNAME ]]; then echo --lib-name "${LIBNAME}" ; fi)
1819
$nanolayer_location \
1920
install gh-release \
2021
"$REPO" \
21-
"$TARGET" \
22-
--version "$VERSION" --bin-location "$BINLOCATION" --lib-location "$LIBLOCATION" $asset_regex_cmd --force
22+
"$BINARYNAME" --force \
23+
--version "$VERSION" --bin-location "$BINLOCATION" --lib-location "$LIBLOCATION" $asset_regex_cmd $lib_name_cmd
2324

test/gh-release/scenarios.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"gh-release": {
66
"version": "latest",
77
"repo": "cli/cli",
8-
"target": "gh"
8+
"binaryName": "gh"
99
}
1010
}
1111
},
@@ -15,7 +15,7 @@
1515
"gh-release": {
1616
"version": "latest",
1717
"repo": "cli/cli",
18-
"target": "gh"
18+
"binaryName": "gh"
1919
}
2020
}
2121
},
@@ -25,7 +25,7 @@
2525
"gh-release": {
2626
"version": "latest",
2727
"repo": "nektos/act",
28-
"target": "act"
28+
"binaryName": "act"
2929
}
3030
}
3131
},
@@ -35,7 +35,7 @@
3535
"gh-release": {
3636
"version": "latest",
3737
"repo": "PowerShell/PowerShell",
38-
"target": "pwsh",
38+
"binaryName": "pwsh",
3939
"assetRegex": "^(?!.*(fxdependent))"
4040
}
4141
}

0 commit comments

Comments
 (0)