Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion bump-pom-scijava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ else

p="$(sed_quote "$property")"
v="$(sed_quote "$value")"
# Set the primary property version
sed \
-e "/<properties>/,/<\/properties>/s/\(<$p>\)[^<]*\(<\/$p>\)/\1$v\2/" \
-e "/<\!-- LIVE PROPERTIES START -->/,/<\!-- LIVE PROPERTIES END -->/s/\(<$p>\)[^<]*\(<\/$p>\)/\1$v\2/" \
$pom > $pom.new &&
if ! cmp $pom $pom.new
then
Expand All @@ -221,6 +222,25 @@ else
mv $pom.new $pom ||
die "Failed to set property $property = $value"

# Set the profile snapshot version
if test "$ga"
value = "$(sh "$maven_helper" latest-version "$ga:SNAPSHOT")"
v="$(sed_quote "$value")"
sed \
-e "/<profile>/,/<\/profile>/s/\(<$p>\)[^<]*\(<\/$p>\)/\1$v\2/" \
$pom > $pom.new &&
if ! cmp $pom $pom.new
then
message="$(printf '%s\n\t%s = %s%s' \
"$message" "$property" "$value" "$latest_message")"
elif test -n "$must_change"
then
die "Profile property $property not found in $pom"
fi &&
mv $pom.new $pom ||
die "Failed to set profile property $property = $value"
fi

shift
shift
done
Expand Down