2021-12-06 16:25:19 +00:00
|
|
|
default: lint frontend_lint test
|
2021-04-03 12:11:47 +00:00
|
|
|
|
|
|
|
lint:
|
2021-12-06 16:25:19 +00:00
|
|
|
golangci-lint run
|
2021-04-03 12:11:47 +00:00
|
|
|
|
2021-09-22 13:36:45 +00:00
|
|
|
publish: frontend
|
2021-04-03 12:11:47 +00:00
|
|
|
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
|
|
|
bash golang.sh
|
|
|
|
|
|
|
|
test:
|
2021-08-19 13:33:56 +00:00
|
|
|
go test -cover -v ./...
|
2021-04-03 12:11:47 +00:00
|
|
|
|
2021-09-22 13:36:45 +00:00
|
|
|
# --- Editor frontend
|
|
|
|
|
2021-12-06 16:25:19 +00:00
|
|
|
frontend: node_modules
|
|
|
|
node ci/build.mjs
|
|
|
|
|
|
|
|
frontend_lint: node_modules
|
|
|
|
./node_modules/.bin/eslint \
|
|
|
|
--ext .js,.vue \
|
|
|
|
--fix \
|
|
|
|
src
|
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm ci
|
2021-09-22 13:36:45 +00:00
|
|
|
|
2021-04-03 12:11:47 +00:00
|
|
|
# --- Wiki Updates
|
2020-12-26 00:35:20 +00:00
|
|
|
|
2021-09-22 13:36:45 +00:00
|
|
|
actor_docs:
|
2022-10-29 13:17:43 +00:00
|
|
|
go run . --storage-conn-string $(shell mktemp).db actor-docs >wiki/Actors.md
|
2021-09-22 13:36:45 +00:00
|
|
|
|
2020-12-26 00:35:20 +00:00
|
|
|
pull_wiki:
|
|
|
|
git subtree pull --prefix=wiki https://github.com/Luzifer/twitch-bot.wiki.git master --squash
|
|
|
|
|
|
|
|
push_wiki:
|
|
|
|
git subtree push --prefix=wiki https://github.com/Luzifer/twitch-bot.wiki.git master
|
2023-04-07 22:41:00 +00:00
|
|
|
|
|
|
|
# --- Tools
|
|
|
|
|
|
|
|
update_ua_list:
|
|
|
|
# User-Agents provided by https://www.useragents.me/
|
|
|
|
curl -sSf https://www.useragents.me/api | jq -r '.data[].ua' | grep -v 'Trident' >internal/linkcheck/user-agents.txt
|
2023-06-12 21:35:54 +00:00
|
|
|
|
|
|
|
# -- Vulnerability scanning --
|
|
|
|
|
|
|
|
trivy:
|
|
|
|
trivy fs . \
|
|
|
|
--dependency-tree \
|
|
|
|
--exit-code 1 \
|
|
|
|
--format table \
|
|
|
|
--ignore-unfixed \
|
|
|
|
--quiet \
|
|
|
|
--scanners config,license,secret,vuln \
|
|
|
|
--severity HIGH,CRITICAL \
|
|
|
|
--skip-dirs docs
|