File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,5 +68,8 @@ git log "$MERGE_BASE"..HEAD --no-merges --pretty=format:"- %aN" | sort -u
6868echo " "
6969echo " "
7070# Note: When using this in a GitHub release, replace {PREVIOUS_VERSION} with the actual previous version tag
71- CURRENT_VERSION=$( nbgv get-version -v Version 2> /dev/null || echo " 0.0" )
71+ CURRENT_VERSION=$( nbgv get-version -v Version 2> /dev/null)
72+ if [ -z " $CURRENT_VERSION " ]; then
73+ CURRENT_VERSION=" UNKNOWN_VERSION"
74+ fi
7275echo " _Full Changelog_: https://github.com/FritzAndFriends/BlazorWebFormsComponents/compare/v{PREVIOUS_VERSION}...v${CURRENT_VERSION} "
Original file line number Diff line number Diff line change @@ -33,10 +33,16 @@ if ! git diff-index --quiet HEAD --; then
3333fi
3434
3535# Get the version from nbgv
36- VERSION=$( nbgv get-version -v Version 2> /dev/null)
36+ VERSION=$( nbgv get-version -v Version 2>&1 )
37+ if [ $? -ne 0 ]; then
38+ echo -e " ${RED} Error: Could not read version using nbgv${NC} " >&2
39+ echo " nbgv output: $VERSION " >&2
40+ echo " Make sure you are in a git repository with version.json" >&2
41+ exit 1
42+ fi
43+
3744if [ -z " $VERSION " ]; then
38- echo -e " ${RED} Error: Could not read version using nbgv${NC} "
39- echo " Make sure you are in a git repository with version.json"
45+ echo -e " ${RED} Error: nbgv returned an empty version${NC} " >&2
4046 exit 1
4147fi
4248
You can’t perform that action at this time.
0 commit comments