|
1 | 1 | #!/usr/bin/env sh |
2 | | -set -e |
3 | 2 |
|
4 | | -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 3 | +SCRIPT_DIR="$(dirname "$0")" |
5 | 4 |
|
6 | 5 | assert_value() { |
7 | 6 | if [ -z "$1" ]; then |
@@ -30,21 +29,23 @@ deploy_parent(){ |
30 | 29 | build(){ |
31 | 30 | build_parent |
32 | 31 | ## Execute Command on Artifacts |
33 | | - while IFS=, read -r artifactId version; do |
| 32 | + while IFS=, read -r artifactId tag; do |
34 | 33 | echo "--------------------------------------------------------------------------" |
35 | | - echo "$artifactId:$version" |
| 34 | + echo "=> $artifactId:$tag" |
36 | 35 | echo "--------------------------------------------------------------------------" |
37 | | - $MVN_CMD clean package -f "$artifactId"/pom.xml |
| 36 | + $MVN_CMD clean versions:set -DnewVersion="$tag" -f "$artifactId/pom.xml" |
| 37 | + $MVN_CMD package -f "$artifactId/pom.xml" |
38 | 38 | done <"$SCRIPT_DIR/artifacts.csv" |
39 | 39 | } |
40 | 40 |
|
41 | 41 | deploy_artifacts(){ |
42 | 42 | ## Execute Command on Artifacts |
43 | 43 | while IFS=, read -r artifactId version; do |
44 | 44 | echo "--------------------------------------------------------------------------" |
45 | | - echo "$artifactId:$version" |
| 45 | + echo "=> $artifactId:$version" |
46 | 46 | echo "--------------------------------------------------------------------------" |
47 | | - $MVN_CMD clean deploy -P release -DskipTests=true -f "$artifactId"/pom.xml |
| 47 | + $MVN_CMD clean versions:set -DnewVersion="$tag" -f "$artifactId/pom.xml" |
| 48 | + $MVN_CMD deploy -P release -DskipTests=true -f "$artifactId/pom.xml" |
48 | 49 | done <"$SCRIPT_DIR/artifacts.csv" |
49 | 50 | } |
50 | 51 |
|
|
0 commit comments