Skip to content

Commit

Permalink
Don't invoke paket bootstrapper from build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGillen committed Jan 16, 2018
1 parent 6fec46d commit e8b3017
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
5 changes: 0 additions & 5 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
@echo off
cls

.paket\paket.bootstrapper.exe
if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
if errorlevel 1 (
exit /b %errorlevel%
Expand Down
42 changes: 0 additions & 42 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -eu

cd "$(dirname "$0")"

PAKET_BOOTSTRAPPER_EXE=.paket/paket.bootstrapper.exe
PAKET_EXE=.paket/paket.exe
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe

Expand All @@ -28,47 +27,6 @@ run() {
fi
}

yesno() {
# NOTE: Defaults to NO
read -p "$1 [y/N] " ynresult
case "$ynresult" in
[yY]*) true ;;
*) false ;;
esac
}

set +e
run $PAKET_BOOTSTRAPPER_EXE
bootstrapper_exitcode=$?
set -e

if [ "$OS" != "Windows_NT" ] &&
[ $bootstrapper_exitcode -ne 0 ] &&
[ $(certmgr -list -c Trust | grep X.509 | wc -l) -le 1 ] &&
[ $(certmgr -list -c -m Trust | grep X.509 | wc -l) -le 1 ]
then
echo "Your Mono installation has no trusted SSL root certificates set up."
echo "This may result in the Paket bootstrapper failing to download Paket"
echo "because Github's SSL certificate can't be verified. One way to fix"
echo "this issue would be to download the list of SSL root certificates"
echo "from the Mozilla project by running the following command:"
echo ""
echo " mozroots --import --sync"
echo ""
echo "This will import over 100 SSL root certificates into your Mono"
echo "certificate repository."
echo ""
if yesno "Run 'mozroots --import --sync' now?"
then
mozroots --import --sync
else
echo "Attempting to continue without running mozroots. This might fail."
fi
# Re-run bootstrapper whether or not the user ran mozroots, because maybe
# they fixed the problem in a separate terminal window.
run $PAKET_BOOTSTRAPPER_EXE
fi

run $PAKET_EXE restore

[ ! -e build.fsx ] && run $PAKET_EXE update
Expand Down

0 comments on commit e8b3017

Please sign in to comment.