diff --git a/.dockerignore b/.dockerignore index 52d48cf2e..3179d8105 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,6 +9,7 @@ Dockerfile dist node_modules +release !entrypoint.sh !evcc.dist.yaml !package*.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41a6fb8dd..eea81e928 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - name: Install tools run: make install - - name: Assets & UI + - name: Assets run: make assets - name: Porcelain @@ -46,7 +46,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v2 with: - version: v1.33 + version: v1.37 - name: Test run: make test @@ -70,9 +70,12 @@ jobs: - name: Install tools run: make install-ui - - name: Assets & UI + - name: Build run: make ui + - name: Lint + run: make lint-ui + - name: Porcelain run: | test -z "$(git status --porcelain)" || (git status; git diff; false) @@ -160,7 +163,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: ^1.14 + go-version: ^1.16 id: go - name: Prepare Image diff --git a/.gitignore b/.gitignore index a6b495f57..ab609b270 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ flags/* buildflags/* linux-*.Dockerfile node_modules +release diff --git a/.goreleaser.yml b/.goreleaser.yml index f2c245174..125bbb324 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,4 @@ +dist: release release: github: owner: andig @@ -28,8 +29,6 @@ archives: - builds: - evcc replacements: - amd64: 64-bit - 386: 32-bit darwin: macOS format: tar.gz format_overrides: diff --git a/Dockerfile b/Dockerfile index a4c5601b4..874115e5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN make install-ui # build ui COPY assets assets COPY vue.config.js vue.config.js +COPY .eslintrc.js .eslintrc.js RUN make clean ui diff --git a/Makefile b/Makefile index 08493cd94..e04ced4f5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: default all clean install install-ui ui assets lint test build test-release release +.PHONY: default all clean install install-ui ui assets lint lint-ui test build test-release release .PHONY: docker publish-testing publish-latest publish-images .PHONY: prepare-image image-rootfs image-update @@ -23,7 +23,7 @@ IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybo default: build -all: clean install install-ui ui assets lint test build +all: clean install install-ui ui assets lint lint-ui test build clean: rm -rf dist/ @@ -42,6 +42,8 @@ assets: lint: golangci-lint run + +lint-ui: npm run lint test: @@ -79,6 +81,7 @@ publish-images: prepare-image: go get github.com/gokrazy/tools/cmd/gokr-packer@latest + go get github.com/gokrazy/rpi-eeprom@latest mkdir -p flags/github.com/gokrazy/breakglass echo "-forward=private-network" > flags/github.com/gokrazy/breakglass/flags.txt mkdir -p buildflags/github.com/andig/evcc diff --git a/docker/tmpl.Dockerfile b/docker/tmpl.Dockerfile index 3411bf8c4..846b6ee73 100644 --- a/docker/tmpl.Dockerfile +++ b/docker/tmpl.Dockerfile @@ -13,6 +13,7 @@ RUN make install-ui # build ui COPY assets assets COPY vue.config.js vue.config.js +COPY .eslintrc.js .eslintrc.js RUN make clean ui