exit_on_error $?
}
-update_version_to_asterisk() {
- local PROJS=""
- if [[ $PROJECT_TYPE == "csproj" ]]; then
- PROJS=$PROJECT
- elif [[ $PROJECT_TYPE == "dir" ]]; then
- PROJS=$PROJECT/*.csproj
- elif [[ $PROJECT_TYPE == "sln" ]]; then
- PROJS=$(find . -name "*.csproj")
- fi
- for p in $PROJS; do
- xmlstarlet ed -L -u "//PackageReference/@Version" --value "*" $p
- xmlstarlet ed -L -u "//PackageReference/@version" --value "*" $p
- done
-}
-
build_project() {
local CSPROJ=$1; shift
cmd_restore() {
if $USE_DOTNET_CLI; then
- update_version_to_asterisk # update PackageReference version to * in .csproj
local OPTS=""
[ -n "$SOURCE" ] && OPTS="$OPTS -s $SOURCE"
run_dotnet restore $PROJECT $OPTS $@