-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Defacto2/now-online
Now online
- Loading branch information
Showing
50 changed files
with
2,013 additions
and
1,991 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -9,22 +9,16 @@ | |
version: "3" | ||
|
||
vars: | ||
BINNAME: df2-server # build output, binary filename (without any extensions) | ||
BINNAME: dist/df2-server # build output, binary filename (without any extensions) | ||
|
||
dotenv: [".env.local"] | ||
dotenv: ["./init/.env.local"] | ||
|
||
tasks: | ||
default: | ||
desc: "Task runner for the Defacto2 web server source code." | ||
cmds: | ||
- task --list-all | ||
silent: true | ||
file-sync: | ||
desc: "Sync the source code to the remote server." | ||
cmds: | ||
- rsync --info=progress2 --recursive --human-readable [email protected]:/opt/assets-defacto2/downloads /home/ben/defacto2-assets/ | ||
- rsync --info=progress2 --recursive --human-readable [email protected]:/opt/assets-defacto2/images000 /home/ben/defacto2-assets/ | ||
- rsync --info=progress2 --recursive --human-readable [email protected]:/opt/assets-defacto2/images400 /home/ben/defacto2-assets/ | ||
doc: | ||
desc: "Generate and browse the application module documentation." | ||
cmds: | ||
|
@@ -41,7 +35,7 @@ tasks: | |
- cmd: gofumpt -l -w . | ||
- cmd: pnpm exec eslint assets/js/*.js | ||
- cmd: pnpm exec stylelint assets/css/*.css | ||
- cmd: golangci-lint run | ||
- cmd: golangci-lint run -c init/.golangci.yaml | ||
lint+: | ||
silent: false | ||
desc: Runs the deadcode and betteralign linters on the source code. | ||
|
@@ -58,9 +52,6 @@ tasks: | |
- cmd: echo "Building..." | ||
- cmd: go build -o {{.BINNAME}} -v server.go | ||
platforms: [linux, darwin, freebsd] | ||
- cmd: go build -o {{.BINNAME}}.exe -v server.go | ||
platforms: [windows] | ||
- cmd: echo "Done!" | ||
build-race: | ||
aliases: | ||
- "buildx" | ||
|
@@ -70,12 +61,8 @@ tasks: | |
- cmd: echo "Building with race conditions..." | ||
- cmd: go build -o {{.BINNAME}} -race -v server.go | ||
platforms: [linux, darwin, freebsd] | ||
- cmd: go build -o {{.BINNAME}}.exe -race -v server.go | ||
platforms: [windows] | ||
- cmd: ./{{.BINNAME}} --version | ||
platforms: [linux, darwin] | ||
- cmd: ./{{.BINNAME}}.exe --version | ||
platforms: [windows] | ||
- cmd: echo "Done!" | ||
build-snapshot: | ||
aliases: | ||
|
@@ -84,18 +71,18 @@ tasks: | |
deps: [assets] | ||
cmds: | ||
- cmd: echo "Building snapshot..." | ||
- cmd: goreleaser build --snapshot --clean | ||
- cmd: goreleaser build --snapshot --clean --config init/.goreleaser.yaml | ||
- cmd: echo "Done!" | ||
build-release: | ||
aliases: | ||
- "buildr" | ||
- "release" | ||
desc: "Build the release binary of the web server embeded with the git version tag." | ||
deps: [assets] | ||
cmds: | ||
- cmd: echo "Git status results:" | ||
- cmd: git status | ||
- cmd: echo "Building snapshot..." | ||
- cmd: goreleaser build --clean | ||
- cmd: goreleaser build --clean --config init/.goreleaser.yaml | ||
- cmd: echo "Done!" | ||
assets: | ||
desc: "Build, compile and compress the web serve CSS and JS assets." | ||
|
@@ -117,50 +104,34 @@ tasks: | |
cmds: | ||
#- set -o pipefail && go test ./... -json | tparse -all | ||
- go test -count 1 -race ./... | ||
serve: | ||
serve-dev: | ||
aliases: | ||
- "serve" | ||
desc: "Run the internal web server in development mode with live reload." | ||
cmds: | ||
- task: serve-linux | ||
- task: serve-windows | ||
serve-prod: | ||
aliases: | ||
- "server" | ||
desc: "Run the internal web server with live reload." | ||
cmds: | ||
- task: serve-linux | ||
- task: serve-windows-prod | ||
- task: serve-air-prod | ||
serve-linux: | ||
internal: true | ||
platforms: [linux, freebsd, darwin] # other supported os can be added here | ||
platforms: [linux, freebsd, darwin] | ||
env: | ||
D2_PRODUCTION: false | ||
D2_PROD_MODE: false | ||
PS_HOST: localhost | ||
deps: [assets] | ||
cmds: | ||
- air | ||
- air -c init/.air.toml | ||
serve-air-prod: | ||
internal: true | ||
platforms: [darwin, linux, freebsd] # other supported os can be added here | ||
env: | ||
D2_PRODUCTION: true | ||
cmds: | ||
- air | ||
serve-windows: | ||
internal: true | ||
platforms: [windows] | ||
env: | ||
D2_PRODUCTION: false | ||
deps: [assets] | ||
cmds: | ||
- air -c .air.windows.toml | ||
serve-windows-prod: | ||
internal: true | ||
platforms: [windows] | ||
platforms: [darwin, linux, freebsd] | ||
env: | ||
D2_PRODUCTION: true | ||
deps: [assets] | ||
D2_PROD_MODE: true | ||
cmds: | ||
- air -c .air.windows.toml | ||
- air -c init/.air.toml | ||
pkg-patch: | ||
silent: false | ||
desc: Update and apply patches to the web server dependencies. | ||
|
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
Oops, something went wrong.