Skip to content

Commit 224dccc

Browse files
committed
Add feature: circleci-cli.
1 parent 83d23df commit 224dccc

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "CircleCI CLI",
3+
"id": "circleci-cli",
4+
"version": "1.0.0",
5+
"description": "Install the CircleCI CLI.",
6+
"options": {
7+
"version": {
8+
"default": "latest",
9+
"description": "Specify what version to install.",
10+
"type": "string"
11+
},
12+
"destdir": {
13+
"default": "/usr/local/bin/",
14+
"description": "Filesystem location of the circleci binary.",
15+
"type": "string"
16+
}
17+
},
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"circleci.circleci"
22+
]
23+
}
24+
}
25+
}

src/circleci-cli/install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
export VERSION="${VERSION:-latest}"
6+
export DESTDIR="${DESTDIR:-/usr/local/bin}"
7+
8+
if [[ "$VERSION" = "latest" ]]; then {
9+
# The remote script treats empty input as "latest"
10+
unset VERSION
11+
} fi
12+
13+
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash

test/circleci-cli/test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
source dev-container-features-test-lib
6+
7+
check "version" bash -c "circleci version"
8+
9+
reportResults

0 commit comments

Comments
 (0)