Fix build

This commit is contained in:
Peter 2021-11-12 13:34:54 +01:00
parent 26a619dc7b
commit 35c844c1dc
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
2 changed files with 8 additions and 9 deletions

View file

@ -20,16 +20,11 @@ jobs:
with: with:
lfs: true lfs: true
- name: Install pkger
run: go get -u github.com/markbates/pkger/cmd/pkger
- name: Install Task - name: Install Task
uses: Arduino/actions/setup-taskfile@master uses: arduino/setup-task@v1
with:
version: '3.x'
- name: Build & test - name: Build & test
run: task download-reveal assets test run: task download-reveal test
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2

View file

@ -3,6 +3,7 @@ version: '3'
vars: vars:
DEBUG_PORT: 2345 DEBUG_PORT: 2345
REVEALJS_VERSION: 4.1.2 REVEALJS_VERSION: 4.1.2
HIGHLIGHTJS_VERSION: 11.3.1
BINARY_NAME: goveal BINARY_NAME: goveal
OUT_DIR: ./out OUT_DIR: ./out
GO_BUILD_ARGS: -ldflags="-w -s" GO_BUILD_ARGS: -ldflags="-w -s"
@ -43,6 +44,7 @@ tasks:
- ./**/*.go - ./**/*.go
deps: deps:
- deps - deps
- fmt
cmds: cmds:
- mkdir -p {{ .OUT_DIR }} - mkdir -p {{ .OUT_DIR }}
- go test -coverprofile={{ .OUT_DIR }}/cov-raw.out -v ./... - go test -coverprofile={{ .OUT_DIR }}/cov-raw.out -v ./...
@ -84,6 +86,8 @@ tasks:
- goreleaser --snapshot --skip-publish --rm-dist - goreleaser --snapshot --skip-publish --rm-dist
download-reveal: download-reveal:
sources:
- Taskfile.yml
cmds: cmds:
- rm -rf ./assets/reveal - rm -rf ./assets/reveal
- mkdir -p ./assets/reveal - mkdir -p ./assets/reveal
@ -92,7 +96,7 @@ tasks:
- git clone https://github.com/denehyg/reveal.js-menu.git ./assets/reveal/plugin/menu - git clone https://github.com/denehyg/reveal.js-menu.git ./assets/reveal/plugin/menu
- curl -L -o ./assets/reveal/plugin/mouse-pointer/mouse-pointer.js https://raw.githubusercontent.com/caiofcm/plugin-revealjs-mouse-pointer/master/mouse-pointer.js - curl -L -o ./assets/reveal/plugin/mouse-pointer/mouse-pointer.js https://raw.githubusercontent.com/caiofcm/plugin-revealjs-mouse-pointer/master/mouse-pointer.js
- rm -f ./assets/reveal/plugin/menu/{bower.json,CONTRIBUTING.md,LICENSE,package.json,README.md,.gitignore,gulpfile.js,package-lock.json} - rm -f ./assets/reveal/plugin/menu/{bower.json,CONTRIBUTING.md,LICENSE,package.json,README.md,.gitignore,gulpfile.js,package-lock.json}
- curl -L https://github.com/highlightjs/highlight.js/archive/10.4.0.tar.gz | tar -xvz --strip-components=3 -C ./assets/reveal/plugin/highlight --wildcards "*.css" highlight.js-10.4.0/src/styles/ - curl -L https://github.com/highlightjs/highlight.js/archive/{{ .HIGHLIGHTJS_VERSION }}.tar.gz | tar -xvz --strip-components=3 -C ./assets/reveal/plugin/highlight --wildcards "*.css" highlight.js-{{ .HIGHLIGHTJS_VERSION }}/src/styles/
go-get-tool: go-get-tool:
vars: vars:
@ -105,7 +109,7 @@ tasks:
cmds: cmds:
- task: go-get-tool - task: go-get-tool
vars: vars:
PACKAGE: mvdan.cc/gofumpt@v0.1.1 PACKAGE: mvdan.cc/gofumpt@v0.2.0
status: status:
- test -f {{ .GOBIN }}gofumpt - test -f {{ .GOBIN }}gofumpt