This repository has been archived by the owner on Sep 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
# Constant variables for simplifying code below. | ||
appID=com.github.jacalz.sparta | ||
icon=internal/assets/icon-512.png | ||
name=Sparta | ||
# Constants for cross compilation and packaging. | ||
appID = com.github.jacalz.sparta | ||
icon = internal/assets/icon-512.png | ||
name = Sparta | ||
|
||
# Default path to the go binary directory. | ||
GOBIN ?= ~/go/bin/ | ||
|
||
bundle: | ||
# Bundle the correct logo into sparta/src/bundled/bundled.go | ||
~/go/bin/fyne bundle -package assets internal/assets/icon-256.png > internal/assets/bundled.go | ||
${GOBIN}fyne bundle -package assets internal/assets/icon-256.png > internal/assets/bundled.go | ||
|
||
# Modify the variable name to be correct. | ||
sed -i 's/resourceIcon256Png/AppIcon/g' internal/assets/bundled.go | ||
|
||
check: | ||
# Check the whole codebase for misspellings. | ||
~/go/bin/misspell -w . | ||
${GOBIN}misspell -w . | ||
|
||
# Run full formating on the code. | ||
gofmt -s -w . | ||
|
||
# Check the whole program for security issues. | ||
~/go/bin/gosec ./... | ||
${GOBIN}gosec ./... | ||
|
||
darwin: | ||
~/go/bin/fyne-cross darwin -arch amd64 -app-id ${appID} -icon ${icon} -output ${name} | ||
${GOBIN}fyne-cross darwin -arch amd64 -app-id ${appID} -icon ${icon} -output ${name} | ||
|
||
linux: | ||
~/go/bin/fyne-cross linux -arch amd64 -app-id ${appID} -icon ${icon} | ||
${GOBIN}fyne-cross linux -arch amd64 -app-id ${appID} -icon ${icon} | ||
|
||
windows: | ||
~/go/bin/fyne-cross windows -arch amd64 -app-id ${appID} -icon ${icon} | ||
${GOBIN}fyne-cross windows -arch amd64 -app-id ${appID} -icon ${icon} | ||
|
||
cross-compile: darwin linux windows |