-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (18 loc) · 730 Bytes
/
Makefile
File metadata and controls
25 lines (18 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
IMG_ID=$(shell dd if=/dev/urandom bs=1k count=1 2> /dev/null | LC_CTYPE=C tr -cd "a-z0-9" | cut -c 1-22)
build: target/x86_64-unknown-linux-musl/release/envsub.gpg target/x86_64-unknown-linux-musl/release/envsub.sha256
.PHONY: publish
publish:
docker build --tag stephenc/envsub:latest .
docker push stephenc/envsub:latest
.PHONY: clean
clean:
cargo clean
target/x86_64-unknown-linux-musl/release/envsub: Cargo.lock Cargo.toml src/main.rs
mkdir -p target/x86_64-unknown-linux-musl/release
docker build --tag envsub:latest .
docker run --rm envsub:latest cat /bin/envsub \
> target/x86_64-unknown-linux-musl/release/envsub
%.gpg: %
gpg -a --output $@ --detach-sig $<
%.sha256: %
cat $< | openssl dgst -sha256 > $@