From 2078deb386b52cb254e6f0fbfc7dc6ddd4df876d Mon Sep 17 00:00:00 2001 From: Daulet Zhanguzin Date: Thu, 4 May 2023 00:01:01 -0700 Subject: [PATCH] one rule for a release --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 6919b063..0b46da19 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ release-darwin-arm64: cp lib/target/aarch64-apple-darwin/release/libtokenizers.a release/darwin-arm64/libtokenizers.a cd release/darwin-arm64 && \ tar -czf libtokenizers.darwin-arm64.tar.gz libtokenizers.a + mkdir -p release/artifacts + cp release/darwin-arm64/libtokenizers.darwin-arm64.tar.gz release/artifacts/libtokenizers.darwin-arm64.tar.gz release-linux-%: docker buildx build --platform linux/$* -f example/Dockerfile . -t tokenizers.linux-$* @@ -19,6 +21,10 @@ release-linux-%: docker run -v $(PWD)/release/linux-$*:/mnt --entrypoint cp tokenizers.linux-$* /workspace/libtokenizers.a /mnt/libtokenizers.a cd release/linux-$* && \ tar -czf libtokenizers.linux-$*.tar.gz libtokenizers.a + mkdir -p release/artifacts + cp release/linux-$*/libtokenizers.linux-$*.tar.gz release/artifacts/libtokenizers.linux-$*.tar.gz + +release: release-darwin-arm64 release-linux-amd64 release-linux-arm64 release-linux-x86_64 test: build @go test -v ./... -count=1