My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh

43 lines
1.2 KiB

# inherit arguments from derivation
dotnetInstallFlags=( ${dotnetInstallFlags[@]-} )
dotnetInstallHook() {
echo "Executing dotnetInstallHook"
runHook preInstall
for project in ${projectFile[@]}; do
env \
dotnet publish "$project" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true \
--output "$out/lib/${pname}" \
--configuration "@buildType@" \
--no-build \
--no-self-contained \
${dotnetInstallFlags[@]} \
${dotnetFlags[@]}
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 \
${dotnetPackFlags[@]} \
${dotnetFlags[@]}
done
fi
runHook postInstall
echo "Finished dotnetInstallHook"
}
if [[ -z "${dontDotnetInstall-}" && -z "${installPhase-}" ]]; then
installPhase=dotnetInstallHook
fi