2020-06-30 15:18:42 +00:00
|
|
|
BIN=target/release/garage
|
|
|
|
DOCKER=lxpz/garage_amd64
|
|
|
|
|
2020-04-05 21:33:42 +00:00
|
|
|
all:
|
2021-04-05 17:55:53 +00:00
|
|
|
clear; cargo build
|
2020-06-30 15:18:42 +00:00
|
|
|
|
|
|
|
$(BIN):
|
2021-03-19 11:19:40 +00:00
|
|
|
RUSTFLAGS="-C link-arg=-fuse-ld=lld -C target-cpu=x86-64 -C target-feature=+sse2" cargo build --release --no-default-features
|
2020-06-30 15:18:42 +00:00
|
|
|
|
|
|
|
$(BIN).stripped: $(BIN)
|
|
|
|
cp $^ $@
|
|
|
|
strip $@
|
|
|
|
|
|
|
|
docker: $(BIN).stripped
|
2021-03-19 13:03:57 +00:00
|
|
|
docker pull archlinux:latest
|
2020-06-30 15:18:42 +00:00
|
|
|
docker build -t $(DOCKER):$(TAG) .
|
|
|
|
docker push $(DOCKER):$(TAG)
|
|
|
|
docker tag $(DOCKER):$(TAG) $(DOCKER):latest
|
|
|
|
docker push $(DOCKER):latest
|
|
|
|
|