Skip to content

Commit

Permalink
Fake DLCs depending on the KSP version
Browse files Browse the repository at this point in the history
Also adjust the `ckan ksp fake` syntax for
KSP-CKAN/CKAN#2773
  • Loading branch information
DasSkelett committed Jun 6, 2019
1 parent 4284f1f commit 5f14412
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion CKAN-meta/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ create_dummy_ksp() {
fi

# Create dummy install.
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" 1.1.0
# The DLCs are simulated depending on the version.
if [[ versions_less_or_equal("$KSP_VERSION", "1.4.0") ]]
then
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION"
elif [[ versions_less_or_equal("$KSP_VERSION", "1.7.1") ]]
then
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" --MakingHistory 1.1.0
else
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" --MakingHistory 1.1.0 --BreakingGround 1.0.0
fi

# Add other compatible versions.
for compVer in "${COMPAT_VERSIONS[@]}"
Expand Down
11 changes: 10 additions & 1 deletion NetKAN/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ create_dummy_ksp() {
fi

# Create dummy install.
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" 1.1.0
# The DLCs are simulated depending on the version.
if [[ versions_less_or_equal("$KSP_VERSION", "1.4.0") ]]
then
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION"
elif [[ versions_less_or_equal("$KSP_VERSION", "1.7.1") ]]
then
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" --MakingHistory 1.1.0
else
mono ckan.exe ksp fake --set-default --headless "$KSP_NAME" dummy_ksp "$KSP_VERSION" --MakingHistory 1.1.0 --BreakingGround 1.0.0
fi

# Add other compatible versions.
for compVer in "${COMPAT_VERSIONS[@]}"
Expand Down

0 comments on commit 5f14412

Please sign in to comment.