From bbf4a8a4cbf363398d6eb9ab12fd9c45e29e8cee Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sat, 15 Jan 2022 02:51:08 +0300 Subject: [PATCH] add CI/CD (shellcheck) --- .github/workflows/shellcheck-dev.yml | 20 ++++++++++++++++ .github/workflows/shellcheck-master.yml | 19 +++++++++++++++ .shellcheck/build.cfg | 2 ++ .shellcheck/test.cfg | 31 +++++++++++++++++++++++++ builder | 6 ++--- helper.lib => common.lib | 0 6 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/shellcheck-dev.yml create mode 100644 .github/workflows/shellcheck-master.yml create mode 100644 .shellcheck/build.cfg create mode 100644 .shellcheck/test.cfg rename helper.lib => common.lib (100%) diff --git a/.github/workflows/shellcheck-dev.yml b/.github/workflows/shellcheck-dev.yml new file mode 100644 index 0000000..3af277f --- /dev/null +++ b/.github/workflows/shellcheck-dev.yml @@ -0,0 +1,20 @@ +name: shellcheck-dev + +on: + push: + branches: + - '*' + - '!master' + +jobs: + shellcheck: + name: shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + env: + SHELLCHECK_OPTS: -x + with: + additional_files: 'builder' \ No newline at end of file diff --git a/.github/workflows/shellcheck-master.yml b/.github/workflows/shellcheck-master.yml new file mode 100644 index 0000000..6c381aa --- /dev/null +++ b/.github/workflows/shellcheck-master.yml @@ -0,0 +1,19 @@ +name: shellcheck + +on: + push: + branches: + - master + +jobs: + shellcheck: + name: shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + env: + SHELLCHECK_OPTS: -x + with: + additional_files: 'builder' \ No newline at end of file diff --git a/.shellcheck/build.cfg b/.shellcheck/build.cfg new file mode 100644 index 0000000..0e9cc14 --- /dev/null +++ b/.shellcheck/build.cfg @@ -0,0 +1,2 @@ +PackageBuildOrder="SomePackageName SomePackageNameMut" +PackageUpload="SomePackageName SomePackageNameMut" diff --git a/.shellcheck/test.cfg b/.shellcheck/test.cfg new file mode 100644 index 0000000..dc9a98f --- /dev/null +++ b/.shellcheck/test.cfg @@ -0,0 +1,31 @@ +# Test parameters + +# Map: +Map="KF-Nuked" + +# Game: +# Survival: KFGameContent.KFGameInfo_Survival +# WeeklyOutbreak: KFGameContent.KFGameInfo_WeeklySurvival +# Endless: KFGameContent.KFGameInfo_Endless +# Objective: KFGameContent.KFGameInfo_Objective +# Versus: KFGameContent.KFGameInfo_VersusSurvival +Game="KFGameContent.KFGameInfo_Survival" + +# Difficulty: +# Normal: 0 +# Hard: 1 +# Suicide: 2 +# Hell: 3 +Difficulty="0" + +# GameLength: +# 4 waves: 0 +# 7 waves: 1 +# 10 waves: 2 +GameLength="0" + +# Mutators +Mutators="SomePackageName.SomePackageNameMut" + +# Additional parameters +Args="" diff --git a/builder b/builder index 3a0b19f..eb189cc 100644 --- a/builder +++ b/builder @@ -13,7 +13,7 @@ ScriptName=$(basename "$0") ScriptDir=$(dirname "$ScriptFullname") # Useful things -source "$ScriptDir/helper.lib" +source "$ScriptDir/common.lib" # Common SteamPath=$(reg_readkey "HKCU\Software\Valve\Steam" "SteamPath") @@ -38,8 +38,8 @@ MutSource="$ScriptDir/.." MutPubContent="$MutSource/PublicationContent" MutConfig="$MutSource/Config" MutLocalization="$MutSource/Localization" -MutBuildConfig="$MutSource/build.ini" # not ini at all but who cares? :D -MutTestConfig="$MutSource/test.ini" +MutBuildConfig="$MutSource/build.cfg" +MutTestConfig="$MutSource/test.cfg" # Steam workshop upload filesystem KFUnpublishBrewedPC="$KFUnpublish/BrewedPC" diff --git a/helper.lib b/common.lib similarity index 100% rename from helper.lib rename to common.lib