@@ -16,8 +16,11 @@ nuget pack cloudscribe.templates.nuspec -OutputDirectory "nupkgs"
1616
1717# Uninstall any existing local version of the template
1818dotnet new uninstall cloudscribe.templates
19+ [ $? -ne 0 ] && echo " dotnet new uninstall failed" && exit 1
20+
1921# Install the new version of the template we've just compiled
2022dotnet new install ./nupkgs/* .nupkg
23+ [ $? -ne 0 ] && echo " dotnet new install failed" && exit 1
2124
2225# now we need to create a new project from the template and try and build it
2326# we'll use various options to test the different template options
@@ -31,6 +34,7 @@ dotnet new install ./nupkgs/*.nupkg
3134DBOPTIONS=" NoDb MSSQL MySql SQLite pgsql AllStorage"
3235
3336S=0
37+ FAILED=" "
3438
3539echo " ---------------------------------------------------------------------------------------------"
3640
@@ -58,12 +62,12 @@ for DB in $DBOPTIONS; do
5862 if [ -d " $SCRIPT_DIR /$TESTPROJECTDIR " ]; then
5963 cd $SCRIPT_DIR /$TESTPROJECTDIR
6064 dotnet new cloudscribe -Da $DB $MODULEOPTIONS
61- [ $? -ne 0 ] && echo " dotnet new failed" && break
65+ [ $? -ne 0 ] && echo " dotnet new failed" && FAILED= " $FAILED $DB " && break
6266 dotnet restore --force --no-cache --force-evaluate
63- [ $? -ne 0 ] && echo " dotnet restore failed" && break
67+ [ $? -ne 0 ] && echo " dotnet restore failed" && FAILED= " $FAILED $DB " && break
6468 dotnet list package
6569 dotnet build
66- [ $? -ne 0 ] && echo " dotnet build failed" && break
70+ [ $? -ne 0 ] && echo " dotnet build failed" && FAILED= " $FAILED $DB " && break
6771 cd $SCRIPT_DIR
6872 S=$(( S+ 1 ))
6973 fi
@@ -73,6 +77,14 @@ for DB in $DBOPTIONS; do
7377done
7478rm -Rf $SCRIPT_DIR /$TESTPROJECTDIR 2> /dev/null
7579
80+ if [ $S -ne 6 ]; then
81+ echo " ------------------------------------------------------"
82+ echo " Failed to build all 6 projects, only built $S "
83+ echo " Failed DB options: $FAILED "
84+ echo " ------------------------------------------------------"
85+ exit 1
86+ fi
87+
7688echo " ------------------------------------------------------"
7789echo " Successfully built $S /6 projects with various options!"
7890echo " ------------------------------------------------------"
0 commit comments