Skip to content

Commit

Permalink
fix: gomobile and wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Feb 15, 2023
1 parent 5074277 commit 65bcd87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ cover.out
.docker-creds

fairos.aar
fairos-sources.jar
fairos-sources.jar
fairos.wasm
fairos.wasm.gz
4 changes: 2 additions & 2 deletions .goreleaser-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project_name: fairos
release:
prerelease: auto
extra_files:
- glob: /home/runner/work/fairOS-dfs/fairOS-dfs/dist/fairos.wasm
- glob: /home/runner/work/fairOS-dfs/fairOS-dfs/dist/fairos.wasm.gz
- glob: ./fairos.wasm
- glob: ./fairos.wasm.gz
builds:
- skip: true
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,10 @@ release-dry-run:
--skip-validate=true \
--skip-publish


BUILD_DIR := $(PWD)
BIN_PATH := $(BUILD_DIR)/dist
EXEC_NAME := fairos.wasm
GZIP_EXEC_NAME := $(EXEC_NAME).gz

.PHONY: wasm
wasm:
@GOOS=js GOARCH=wasm $(GO) build -ldflags="-s -w" -o $(BIN_PATH)/$(EXEC_NAME)
@gzip -9 -v -c $(BIN_PATH)/$(EXEC_NAME) > $(BIN_PATH)/$(GZIP_EXEC_NAME)
@GOOS=js GOARCH=wasm $(GO) build -ldflags="-s -w" -o fairos.wasm
@gzip -9 -v -c fairos.wasm > fairos.wasm.gz

.PHONY: android
android:
Expand Down

0 comments on commit 65bcd87

Please sign in to comment.