Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/analyze-test-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'install.sh'
pull_request:
branches: [trunk]
paths-ignore:
- 'docs/**'
- 'README.md'
- 'install.sh'

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'install.sh'
pull_request:
branches: [trunk]
paths-ignore:
- 'docs/**'
- 'README.md'
- 'install.sh'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'install.sh'

jobs:
e2e-tests:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test-install-script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test Install Script

on:
pull_request:
branches: [trunk]
paths:
- 'install.sh'

jobs:
test-install-script:
name: Test Install Script
runs-on: elvia-runner
steps:
- name: Test install script
run: |
curl -fsSL "https://raw.githubusercontent.com/3lvia/cli/$COMMIT_SHA/install.sh" | bash
3lv
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

**3lv** – the Command Line Interface tool for creating, building and securing Elvia applications ⚡

## 📦 Installation

### TL;DR

```bash
curl -fsSL https://raw.githubusercontent.com/3lvia/cli/trunk/install.sh | bash
```

### See [Installation](docs/installation.md) for more options.

## 🚀 Features

- **Build** a container for .NET, Go or Python projects without needing a Dockerfile.
Expand Down
8 changes: 8 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## 💾 Installation

### TL;DR

```bash
curl -fsSL https://raw.githubusercontent.com/3lvia/cli/trunk/install.sh | bash
```

Supported platforms:

- **Linux/WSL** (recommended)
Expand Down Expand Up @@ -29,7 +35,9 @@ sudo install -Dm755 -t /usr/local/bin 3lv
```

#### Example Mac installation

The installation is done by first installing the app, secondly trying (and failing) to open it, and thirdly [allowing the opening of it](https://support.apple.com/en-gb/guide/mac-help/mh40616/mac).

```bash
tar -xzf 3lv-macos-arm64.tar.gz
sudo install -Dm755 3lv /usr/local/bin/
Expand Down
50 changes: 50 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

set -euo pipefail

LATEST_VERSION=$(curl -fsSl https://raw.githubusercontent.com/3lvia/cli/refs/heads/trunk/VERSION)

# Check if mac or linux
if [[ "$OSTYPE" == "darwin"* ]]; then
OS="mac"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
OS="linux"
else
echo "Unsupported OS: $OSTYPE"
exit 1
fi

# Check architecture
ARCH=$(uname -m)
if [[ "$ARCH" == "x86_64" ]]; then
ARCH="amd64"
elif [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
ARCH="arm64"
else
echo "Unsupported architecture: $ARCH"
exit 1
fi

cd "$(mktemp -d)"
TARBALL="3lv-$LATEST_VERSION-$OS-$ARCH.tar.gz"

curl -fsSL -o "$TARBALL" "https://github.com/3lvia/cli/releases/download/v$LATEST_VERSION/$TARBALL"
curl -fsSL -o "$TARBALL.md5" "https://github.com/3lvia/cli/releases/download/v$LATEST_VERSION/$TARBALL.md5"

# Check if md5sum is installed
if ! md5sum --version &> /dev/null; then
echo "Command 'md5sum' could not be found, will skip verifying integrity of the download."
echo "In the future, please ensure md5sum is installed."
else
md5sum -c "$TARBALL.md5"
fi

tar -xzf "$TARBALL"

if [[ "$OS" == "mac" ]]; then
sudo install -Dm755 3lv /usr/local/bin/
else
sudo install -Dm755 -t /usr/local/bin 3lv
fi

echo "3lv version $LATEST_VERSION installed successfully!"
Loading