forked from evan-buss/openbooks
-
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.
feat(ci): use task instead of makefile
- Easier to use cross platform (Windows) - Self documenting / less confusing - Better structure as we can use separate task files to organize by functionality.
- Loading branch information
Showing
5 changed files
with
82 additions
and
36 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ openbooks | |
!openbooks/ | ||
*.DS_Store | ||
**/dist | ||
.task/ | ||
# end persist | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# https://taskfile.dev | ||
|
||
version: "3" | ||
|
||
tasks: | ||
go-update: | ||
desc: Update Golang dependencies. | ||
cmds: | ||
- go get -u ./.. | ||
- go mod tidy | ||
|
||
npm-update: | ||
desc: Update Node.JS client side dependencies. | ||
dir: server/app | ||
cmds: | ||
- npx npm-check-updates -i | ||
interactive: true | ||
|
||
npm-install: | ||
desc: Install Node.JS client side dependencies. | ||
dir: server/app | ||
cmds: | ||
- npm install | ||
sources: | ||
- package.json | ||
- package-lock.json | ||
|
||
mock: | ||
desc: Start Mock Server for Development | ||
dir: cmd/mock_server | ||
cmds: | ||
- go run . | ||
|
||
cli: | ||
desc: Run OpenBooks in CLI Mode. | ||
dir: cmd/openbooks | ||
cmds: | ||
- go build | ||
- ./openbooks cli --server localhost:6667 | ||
|
||
server: | ||
desc: Run OpenBooks in Server Mode. | ||
dir: cmd/openbooks | ||
cmds: | ||
- go build | ||
- ./openbooks server --tls=false --server localhost:6667 | ||
|
||
client: | ||
desc: Run OpenBooks React Client Application in Development Mode. | ||
dir: server/app | ||
cmds: | ||
- npm run dev |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# https://taskfile.dev | ||
|
||
version: "3" | ||
|
||
tasks: | ||
npm-build: | ||
internal: true | ||
dir: server/app | ||
cmds: | ||
- npm ci | ||
- npm run build | ||
|
||
build: | ||
desc: Build OpenBooks binaries for all supported platforms. | ||
dir: cmd/openbooks | ||
cmds: | ||
- go get ./.. | ||
- env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./../../build/openbooks.exe | ||
- env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ./../../build/openbooks_mac | ||
- env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./../../build/openbooks_mac_arm | ||
- env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./../../build/openbooks_linux | ||
- env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./../../build/openbooks_linux_arm |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://taskfile.dev | ||
|
||
version: "3" | ||
|
||
includes: | ||
dev: Taskfile.Development.yaml | ||
release: Taskfile.Release.yaml |