mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Update default taskfile. Update copyright symbol
This commit is contained in:
@@ -22,7 +22,7 @@ type BuildAssetsOptions struct {
|
||||
ProductDescription string `description:"The description of the product" default:"My Product Description"`
|
||||
ProductVersion string `description:"The version of the product" default:"0.1.0"`
|
||||
ProductCompany string `description:"The company of the product" default:"My Company"`
|
||||
ProductCopyright string `description:"The copyright notice" default:"(c) now, My Company"`
|
||||
ProductCopyright string `description:"The copyright notice" default:"\u00a9 now, My Company"`
|
||||
ProductComments string `description:"Comments to add to the generated files" default:"This is a comment"`
|
||||
ProductIdentifier string `description:"The product identifier, e.g com.mycompany.myproduct"`
|
||||
Silent bool `description:"Suppress output to console"`
|
||||
|
||||
@@ -13,7 +13,7 @@ type Init struct {
|
||||
ProductDescription string `description:"The description of the product" default:"My Product Description"`
|
||||
ProductVersion string `description:"The version of the product" default:"0.1.0"`
|
||||
ProductCompany string `description:"The company of the product" default:"My Company"`
|
||||
ProductCopyright string `description:"The copyright notice" default:"(c) now, My Company"`
|
||||
ProductCopyright string `description:"The copyright notice" default:"\u00a9 now, My Company"`
|
||||
ProductComments string `description:"Comments to add to the generated files" default:"This is a comment"`
|
||||
ProductIdentifier string `description:"The product identifier, e.g com.mycompany.myproduct"`
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ tasks:
|
||||
cmds:
|
||||
- go build {{ "{{.BUILD_FLAGS}}" }} -o {{ "{{.BIN_DIR}}" }}/{{.ProjectName}}.exe
|
||||
vars:
|
||||
BUILD_FLAGS: {{ "'{{if eq .PRODUCTION \"true\"}}-tags production -ldflags=\"-w -s\"{{else}}-gcflags=all=\"-N -l\"{{end}}'" }}
|
||||
BUILD_FLAGS: {{ "'{{if eq .PRODUCTION \"true\"}}-tags production -ldflags=\"-w -s -H windowsgui\"{{else}}-gcflags=all=\"-N -l\"{{end}}'" }}
|
||||
env:
|
||||
GOOS: windows
|
||||
CGO_ENABLED: 0
|
||||
@@ -120,6 +120,56 @@ tasks:
|
||||
vars:
|
||||
ARCH: amd64
|
||||
|
||||
|
||||
## ------> Linux <-------
|
||||
|
||||
build:linux:
|
||||
summary: Builds the application for Linux
|
||||
deps:
|
||||
- task: build:frontend
|
||||
- task: generate:icons
|
||||
vars:
|
||||
ARCH: {{ "'{{.ARCH}}'" }}
|
||||
cmds:
|
||||
- go build {{ "{{.BUILD_FLAGS}}" }} -o {{ "{{.BIN_DIR}}" }}/{{.ProjectName}}
|
||||
vars:
|
||||
BUILD_FLAGS: {{ "'{{if eq .PRODUCTION \"true\"}}-tags production -ldflags=\"-w -s\"{{else}}-gcflags=all=\"-N -l\"{{end}}'" }}
|
||||
env:
|
||||
GOOS: linux
|
||||
CGO_ENABLED: 1
|
||||
GOARCH: {{ "'{{.ARCH | default ARCH}}'" }}
|
||||
PRODUCTION: {{ "'{{.PRODUCTION | default \"false\"}}'" }}
|
||||
|
||||
build:linux:prod:arm64:
|
||||
summary: Creates a production build of the application
|
||||
cmds:
|
||||
- task: build:linux
|
||||
vars:
|
||||
ARCH: arm64
|
||||
PRODUCTION: "true"
|
||||
|
||||
build:linux:prod:amd64:
|
||||
summary: Creates a production build of the application
|
||||
cmds:
|
||||
- task: build:linux
|
||||
vars:
|
||||
ARCH: amd64
|
||||
PRODUCTION: "true"
|
||||
|
||||
build:linux:debug:arm64:
|
||||
summary: Creates a debug build of the application
|
||||
cmds:
|
||||
- task: build:linux
|
||||
vars:
|
||||
ARCH: arm64
|
||||
|
||||
build:linux:debug:amd64:
|
||||
summary: Creates a debug build of the application
|
||||
cmds:
|
||||
- task: build:linux
|
||||
vars:
|
||||
ARCH: amd64
|
||||
|
||||
## -------------------------- Package -------------------------- ##
|
||||
|
||||
package:
|
||||
@@ -182,9 +232,10 @@ tasks:
|
||||
PRODUCTION: "true"
|
||||
ARCH: {{ "'{{.ARCH}}'" }}
|
||||
cmds:
|
||||
- makensis -DARG_WAILS_ARM64_BINARY="{{ "{{.ROOT_DIR}}"}}\{{ "{{.BIN_DIR}}" }}\{{ "{{.APP_NAME}}"}}.exe" project.nsi
|
||||
- makensis -DARG_WAILS_{{ "'{{.ARG_FLAG}}'" }}_BINARY="{{ "{{.ROOT_DIR}}"}}\{{ "{{.BIN_DIR}}" }}\{{ "{{.APP_NAME}}"}}.exe" project.nsi
|
||||
vars:
|
||||
ARCH: {{ "'{{.ARCH | default ARCH}}'" }}
|
||||
ARG_FLAG: {{ "'{{if eq .ARCH \"amd64\"}}AMD64{{else}}ARM64{{end}}'" }}
|
||||
|
||||
## ------> Darwin <------
|
||||
|
||||
@@ -249,6 +300,7 @@ tasks:
|
||||
- sh: npm version
|
||||
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
|
||||
cmds:
|
||||
# - npm install --silent --no-progress
|
||||
- npm install
|
||||
|
||||
build:frontend:
|
||||
|
||||
Reference in New Issue
Block a user