Skip to content

Commit

Permalink
ci: Many more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Nov 20, 2022
1 parent 0df3d4d commit c09064d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
gen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod
cache: true
- run: COLOR=1 ./make.sh gen
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
lint:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
.POSIX:

.PHONY: all
all: fmt lint build test
all: fmt gen lint build test
ifdef CI
all: assert-linear
endif

.PHONY: fmt
fmt:
prefix "$@" ./ci/sub/fmt/make.sh
.PHONY: fmt-release
fmt-release_sh:
prefix "$@" ./ci/release/gen_sh.sh
.PHONY: gen
gen:
prefix "$@" ./ci/gen.sh
.PHONY: lint
lint:
prefix "$@" go vet --composites=false ./...
Expand Down
2 changes: 1 addition & 1 deletion ci/release/gen_sh.sh → ci/gen.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -eu
cd -- "$(dirname "$0")/../.."
cd -- "$(dirname "$0")/.."
. ./ci/sub/lib.sh

./ci/release/gen_install.sh
Expand Down
4 changes: 0 additions & 4 deletions ci/release/gen_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ sh_c cat \
sh_c cat ./ci/release/_install.sh \
\| sed -n "'/cd -- \"\$(dirname/,/cd -/!p'" \>\> install.sh
sh_c chmod -w install.sh

if [ -n "${CI-}" ]; then
git_assert_clean
fi
4 changes: 0 additions & 4 deletions ci/release/gen_template_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ sh_c cat \
./ci/sub/lib/log.sh \
\| sed "-e'/^\. /d'" \>\>./ci/release/template/scripts/lib.sh
sh_c chmod -w ./ci/release/template/scripts/lib.sh

if [ -n "${CI-}" ]; then
git_assert_clean
fi

0 comments on commit c09064d

Please sign in to comment.