forked from otto-de/gitactionboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·63 lines (57 loc) · 2.87 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" ; pwd -P)"
# Source glob libs
# shellcheck source=bin/lib.sh
. "${SCRIPT_DIR}/bin/lib.sh"
_usage() {
cat <<EOF
Usage: $0 command
commands:
check Run checks (OWASP dependency check)
format Auto format source files
run-locally [auth token] [with frontend] Run local version of service with/without frontend
run-frontend-locally Run local version of frontend service with mock data
test Build and test the service
pitest [use history] Run mutation tests
backend-test Run test for backend code
frontend-test Run test for frontend code
docker-build Build docker image
build-jar Build executable boot jar file
talisman-verify Verify no sensitive information is committed using talisman
trivy-verify Verify there is no vulnerability in docker image
bump-version Release a new version
copy-frontend Build and copy the frontend code base to backend resources folder
frontend-build-for-github-pages Build frontend for GitHub pages
generate-changelog Generate changelog from last tag and write in CHANGELOG.md
generate-changelog-url [tag] Generate changelog url for given tag
add-contributor <username> <contribution type> Add new contributor to contributors list
generate-contributors-list Generate contributors list from .all-contributorsrc file and update it in readme
EOF
exit 1
}
CMD=${1:-}
shift || true
case ${CMD} in
check) _check ;;
format) _format_sources ;;
run-locally) _run_locally "${1:-}" "${2:-true}" ;;
run-locally-with-mock-data) _run_locally_with_mock_data "${1:-}" "${2:-true}" ;;
run-frontend-locally) _run_frontend_locally ;;
test) _test ;;
pitest) _pitest "$@";;
backend-test) _test "backend";;
frontend-test) _test "frontend";;
docker-build) _docker_build ;;
frontend-build-for-github-pages) _frontend_build_for_github_pages ;;
talisman-verify) _talisman_verify ;;
trivy-verify) _trivy_verify ;;
bump-version) _bump_version ;;
copy-frontend) _copy_frontend ;;
generate-changelog) _generate_changelog ;;
add-contributor) _add_contributor "${1}" "${2}" ;;
generate-contributors-list) _generate_contributors_list ;;
generate-changelog-url) _generate_changelog_url "${1}" ;;
build-jar) _build_jar ;;
*) _usage ;;
esac