Skip to content

Commit

Permalink
one rule for a release
Browse files Browse the repository at this point in the history
  • Loading branch information
Daulet Zhanguzin committed May 4, 2023
1 parent 6132946 commit 2078deb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ 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-$*
mkdir -p 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
Expand Down

0 comments on commit 2078deb

Please sign in to comment.