vade-cli 0.1.1

A command-line tool to deploy applications on Linux servers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
set lazy

latest := `curl -s https://api.github.com/repos/arp242/goatcounter/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4`
current := `cat artifacts/goatcounter.version 2>/dev/null || true`

# Download goatcounter, unless we already have the latest release
prepare-artifacts:
    {{ if latest == current { "echo goatcounter " + latest + " already up to date" } else { "just _download " + latest } }}

[private]
_download tag:
    mkdir -p artifacts
    curl -sL "https://github.com/arp242/goatcounter/releases/download/{{tag}}/goatcounter-{{tag}}-linux-amd64.gz" | gunzip > artifacts/goatcounter
    chmod +x artifacts/goatcounter
    echo "{{tag}}" > artifacts/goatcounter.version