forked from cloudfoundry/java-buildpack-dependency-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwso2-microgateway.sh
More file actions
executable file
·34 lines (22 loc) · 831 Bytes
/
wso2-microgateway.sh
File metadata and controls
executable file
·34 lines (22 loc) · 831 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2
SOURCE_DIRECTORY="product-microgateway"
build() {
pushd ${SOURCE_DIRECTORY} > /dev/null
sed -i -e 's|<url>http://maven.wso2.org|<url>https://maven.wso2.org|g' pom.xml
mvn -Dmaven.test.skip=true package
popd > /dev/null
}
version() {
pushd ${SOURCE_DIRECTORY} > /dev/null
local version=$(git describe --tags)
version="${version##v}"
echo ${version}
popd > /dev/null
}
VERSION=$(version)
build
cp ${SOURCE_DIRECTORY}/distribution/target/wso2am-micro-gw-${VERSION}.zip repository/wso2am-micro-gw-runtime-${VERSION}.zip
cp ${SOURCE_DIRECTORY}/distribution/target/wso2am-micro-gw-toolkit-${VERSION}.zip repository/wso2am-micro-gw-toolkit-${VERSION}.zip
echo ${VERSION} > repository/version