2022-04-25 18:58:19 +02:00
|
|
|
# inherit arguments from derivation
|
|
|
|
dotnetInstallFlags=( ${dotnetInstallFlags[@]-} )
|
2022-01-13 07:39:44 +01:00
|
|
|
|
|
|
|
dotnetInstallHook() {
|
|
|
|
echo "Executing dotnetInstallHook"
|
|
|
|
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-07-20 22:37:14 +02:00
|
|
|
if [ "${selfContainedBuild-}" ]; then
|
|
|
|
dotnetInstallFlags+=("--self-contained")
|
|
|
|
else
|
|
|
|
dotnetInstallFlags+=("--no-self-contained")
|
|
|
|
fi
|
|
|
|
|
2022-01-13 07:39:44 +01:00
|
|
|
for project in ${projectFile[@]}; do
|
|
|
|
env \
|
|
|
|
dotnet publish "$project" \
|
|
|
|
-p:ContinuousIntegrationBuild=true \
|
|
|
|
-p:Deterministic=true \
|
2022-07-04 11:06:16 +02:00
|
|
|
-p:UseAppHost=true \
|
2022-01-13 07:39:44 +01:00
|
|
|
--output "$out/lib/${pname}" \
|
|
|
|
--configuration "@buildType@" \
|
|
|
|
--no-build \
|
2022-04-10 22:48:41 +02:00
|
|
|
${dotnetInstallFlags[@]} \
|
|
|
|
${dotnetFlags[@]}
|
2022-01-13 07:39:44 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
if [[ "${packNupkg-}" ]]; then
|
|
|
|
for project in ${projectFile[@]}; do
|
|
|
|
env \
|
|
|
|
dotnet pack "$project" \
|
|
|
|
-p:ContinuousIntegrationBuild=true \
|
|
|
|
-p:Deterministic=true \
|
|
|
|
--output "$out/share" \
|
|
|
|
--configuration "@buildType@" \
|
|
|
|
--no-build \
|
2022-04-10 22:48:41 +02:00
|
|
|
${dotnetPackFlags[@]} \
|
|
|
|
${dotnetFlags[@]}
|
2022-01-13 07:39:44 +01:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
|
|
|
|
echo "Finished dotnetInstallHook"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z "${dontDotnetInstall-}" && -z "${installPhase-}" ]]; then
|
|
|
|
installPhase=dotnetInstallHook
|
|
|
|
fi
|