|
| 1 | +#!/usr/bin/env bash |
| 2 | +# |
| 3 | +# Copyright (C) 2006-2025 Talend Inc. - www.talend.com |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +set -xe |
| 19 | + |
| 20 | +# Parameters: |
| 21 | +# $1: release version |
| 22 | +# $2: next version |
| 23 | +# $3: extra build args for all mvn cmd |
| 24 | +main() { |
| 25 | + local releaseVersion="${1?Missing release version}"; shift |
| 26 | + local nextVersion="${1?Missing actual project version}"; shift |
| 27 | + local extraBuildParams=("$@") |
| 28 | + |
| 29 | + printf ">> Maven perform release" |
| 30 | + |
| 31 | + # todo: add gpg2 profile for signing artifacts |
| 32 | + local release_profiles="release-zl" |
| 33 | + |
| 34 | + # set the release version in the pom.xml |
| 35 | + mvn versions:set -DnewVersion="${releaseVersion}" |
| 36 | + |
| 37 | + mvn clean deploy \ |
| 38 | + --file "component-studio/pom.xml" \ |
| 39 | + --define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \ |
| 40 | + --settings .jenkins/settings.xml \ |
| 41 | + --activate-profiles ${release_profiles} \ |
| 42 | + "${extraBuildParams[@]}" |
| 43 | + |
| 44 | + mvn versions:set -DnewVersion="${nextVersion}" |
| 45 | +} |
| 46 | + |
| 47 | +main "$@" |
0 commit comments