vaultwarden/Makefile
Robert Kaussow d36cb0ecc8
Some checks are pending
continuous-integration/drone/pr Build is pending
rename missing references
2021-05-13 23:17:24 +02:00

30 lines
713 B
Makefile

# renovate: datasource=github-releases depName=dani-garcia/vaultwarden
export BUILD_VERSION ?= 1.20.0
export DEBIAN_FRONTEND ?= noninteractive
export LANG ?= C.UTF-8
export TZ ?= UTC
DB ?= sqlite,postgresql
SRC := src
.PHONY: all
all: build
.PHONY: build
build: build-src build-bin
.PHONY: build-src
build-src:
mkdir -p $(SRC); \
curl -sSL "https://github.com/dani-garcia/vaultwarden/archive/$${BUILD_VERSION##v}.tar.gz" | tar xz -C $(SRC) --strip-components=1
.PHONY: build-bin
build-bin:
rustup set profile minimal && \
cd $(SRC) && \
rustup target add x86_64-unknown-linux-musl && \
VWRS_VERSION="$${BUILD_VERSION##v}" cargo build -j 8 --features $(DB) --release
.PHONY: clean
clean:
rm -rf $(SRC)