-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbuild.sh
executable file
·38 lines (30 loc) · 1.53 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# One option argument is version number.
# When version needs to change, please provide version in n.n.n.n format. e.g.
# ./build.sh 2.3.4.5
check_version()
{
MAJOR=$(echo $FULL_VERSION | cut -d'.' -f1)
MINOR=$(echo $FULL_VERSION | cut -d'.' -f2)
PATCH=$(echo $FULL_VERSION | cut -d'.' -f3)
RELEASE=$(echo $FULL_VERSION | cut -d'.' -f4)
EXTRA=$(echo $FULL_VERSION | cut -d'.' -f5)
if [ "$MAJOR" == "" ] || [ "$MINOR" == "" ] || [ "$PATCH" == "" ] || [ "$RELEASE" == "" ] || [ "$EXTRA" != "" ];
then
echo Invalid version format: $FULL_VERSION. please give it in n.n.n.n format.
exit 1
fi
}
if [ "$1" != "" ];
then
# check version
FULL_VERSION=$1
check_version
echo "version=${FULL_VERSION}" >|./src/main/resources/redshift_jdbc_driver.properties
mvn versions:set -DartifactId=redshift-jdbc42 -DnewVersion=$1
mvn versions:commit
fi
#mvn install:install-file -Dfile=lib/aws-java-sdk-redshift-internal-1.12.x.jar -DgroupId=com.amazonaws -DartifactId=aws-java-sdk-redshift-internal -Dversion=1.12.x -Dpackaging=jar -DgeneratePom=true
#mvn install:install-file -Dfile=lib/aws-java-sdk-redshift-arcadia-internal-1.0.jar -DgroupId=com.amazonaws -DartifactId=aws-java-sdk-redshift-arcadia-internal -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
#mvn install:install-file -Dfile=lib/AWSSSOOIDCJavaClient-1.12.x.jar -DgroupId=com.amazonaws -DartifactId=aws-java-sdk-ssooidc -Dversion=1.12.x -Dpackaging=jar -DgeneratePom=true
mvn -P release-artifacts clean install