vaultwarden/Makefile
Robert Kaussow 785fc6bb47
Some checks failed
continuous-integration/drone/push Build is failing
add rust target x86_64-unknown-linux-musl
2020-03-22 15:33:03 +01:00

29 lines
600 B
Makefile

export BUILD_VERSION ?= 1.14.1
export DEBIAN_FRONTEND ?= noninteractive
export LANG ?= C.UTF-8
export TZ ?= UTC
DB ?= 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/bitwarden_rs/archive/$${BUILD_VERSION##v}.tar.gz" | tar xz -C $(SRC) --strip-components=1
.PHONY: build-bin
build-bin:
rustup set profile minimal && \
rustup target add x86_64-unknown-linux-musl && \
cd $(SRC) && \
cargo build -j 8 --features $(DB) --release
.PHONY: clean
clean:
rm -rf $(SRC)