Skip to content

Commit 431ba19

Browse files
authored
Merge pull request #8 from stuartleeks/sl/docs
Add install docs and fix binary name in releases
2 parents e2dfbe0 + 75686c0 commit 431ba19

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
builds:
22
- env:
33
- CGO_ENABLED=0
4+
binary: devcontainer
45
goos:
56
- linux
67
- darwin

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,23 @@
22

33
devcontainer-cli is the start of a CLI to improve the experience of working with [Visual Studio Code devcontainers](https://code.visualstudio.com/docs/remote/containers)
44

5+
**Status: this is a pet project that I've been experimenting with. It is not supported and you should expect bugs :-)**
6+
57
## Installation
68

7-
TODO - add this once releases are automated!
9+
Head to the [latest release page](https://github.com/stuartleeks/devcontainer-cli/releases/latest) and download the archive for your platform.
10+
11+
Extract `devcontainer` from the archive and place in a folder in your `PATH`.
12+
13+
Or if you just don't care and are happy to run random scripts from the internet:
14+
15+
```bash
16+
OS=linux # also darwin
17+
ARCH=amd64 # also 386
18+
wget https://raw.githubusercontent.com/stuartleeks/devcontainer-cli/master/scripts/install.sh
19+
chmod +x install.sh
20+
sudo -E ./install.sh
21+
```
822

923
## Enabling bash completion
1024

scripts/install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Expects
5+
# OS=linux or darwin
6+
# ARCH=amd64 or 386
7+
8+
if [[ -z "$OS" ]]; then
9+
echo "$OS"
10+
echo "OS not set: expected linux or darwin"
11+
exit 1
12+
fi
13+
if [[ -z "$ARCH" ]]; then
14+
echo "ARCH not set: expected amd64 or 386"
15+
exit 1
16+
fi
17+
18+
19+
LATEST_VERSION=$(curl --silent "https://api.github.com/repos/stuartleeks/devcontainer-cli/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
20+
echo $LATEST_VERSION
21+
wget https://github.com/stuartleeks/devcontainer-cli/releases/download/${LATEST_VERSION}/devcontainer-cli_${OS}_${ARCH}.tar.gz
22+
tar -C /usr/bin -zxvf devcontainer-cli_${OS}_${ARCH}.tar.gz devcontainer
23+
chmod +x /usr/bin/devcontainer

0 commit comments

Comments
 (0)