Skip to content

Commit

Permalink
chore: Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
qbart committed Oct 8, 2023
1 parent 79da5ee commit f7bc359
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ tmp/
.DS_Store
*.wasm
tilesets/
releases/
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ build:
mkdir -p bin/
GOOS=js GOARCH=wasm go build -o bin/hashira.wasm cmd/hashira/main.go
go build -o bin/serve cmd/wasm-serve/main.go

.PHONY: release
release:
mkdir -p releases/${TAG}
GOOS=js GOARCH=wasm go build -o bin/hashira.wasm cmd/hashira/main.go
mv bin/hashira.wasm releases/${TAG}/hashira.wasm
cp ui/hashira.js releases/${TAG}/hashira.js
cd releases/${TAG} && zip -r -9 ${TAG}.zip *.js *.wasm
mv releases/${TAG}/${TAG}.zip releases/${TAG}.zip
cd releases/${TAG} && tar -cvzf ${TAG}.tar.gz *.js *.wasm
mv releases/${TAG}/${TAG}.tar.gz releases/${TAG}.tar.gz
rm -rf releases/${TAG}

0 comments on commit f7bc359

Please sign in to comment.