CI: Travis: build.sh: add: MAIN function, add notes

M  build.sh
This commit is contained in:
Anton-Latukha 2020-05-28 00:57:13 +03:00
parent 7c6d5c295f
commit 8f77f35349
No known key found for this signature in database
GPG Key ID: 3D84C07E91802E41
1 changed files with 24 additions and 0 deletions

View File

@ -41,3 +41,27 @@ allowInconsistentDependencies=${allowInconsistentDependencies:-'false'}
ghcjsTmpLogFile=${ghcjsTmpLogFile:-'/tmp/ghcjsTmpLogFile.jog'}
ghcjsLogTailLength=${ghcjsLogTailLength:-'10000'}
MAIN() {
# NOTE: Secrets are not shared to PRs from forks
# NOTE: nix-build | cachix push <name> - uploads binaries, runs&works only in the branches of the main repository, so for PRs - else case runs
if [ ! "$CACHIX_SIGNING_KEY" = "" ]
then
# NOTE: Build of the inside repo branch - enable push Cachix cache
BUILD_PROJECT | cachix push "$name"
else
# NOTE: Build of the side repo/PR - can not push Cachix cache
BUILD_PROJECT
fi
}
# NOTE: Run the entry function of the script
MAIN