-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the "Deploy Snapshots" action to only run for snapshot versions
- Loading branch information
1 parent
20d1dd9
commit 7d052d0
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=project.version -nsu | grep -e '^[[:digit:]]') | ||
|
||
if [ "${CURRENT_VERSION}" = "" ]; then | ||
echo "Could not find current version from Maven" | ||
exit 1 | ||
fi | ||
|
||
if [ -z $(echo "${CURRENT_VERSION}" | grep SNAPSHOT) ]; then | ||
echo "This job only deploys SNAPSHOT versions, skipping version ${CURRENT_VERSION}" | ||
exit 0 | ||
fi | ||
|
||
echo "Building version ${CURRENT_VERSION}" | ||
mvn -s ./.mvn/settings.xml -B clean deploy -DskipTests -Pcoherence-ce -Dgithub.build=true |