forked from microsoft/azure-tools-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildDevint
56 lines (44 loc) · 1.91 KB
/
BuildDevint
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd $SCRIPTPATH
MAVEN_QUIET=""
INTELLIJ_VERSION=false
while getopts ":hqv" option; do
case $option in
h) echo "usage: $0 [-h] [-q] [-v]"; exit ;;
q) MAVEN_QUIET="-q" ;;
v) INTELLIJ_VERSION=true ;;
?) echo "error: option -$OPTARG is not implemented"; exit ;;
esac
done
ARTIFACTS_DIR="artifacts"
# check dir exists
if [ ! -d "$ARTIFACTS_DIR" ]; then
echo "Creating artifacts directory $ARTIFACTS_DIR"
mkdir -p $ARTIFACTS_DIR
fi
# echo shell commands when they are executed.
set -x
# Build Utils
mvn install -f $SCRIPTPATH/Utils/pom.xml -Dmaven.repo.local=$SCRIPTPATH/.repository $MAVEN_QUIET
mvn install -f $SCRIPTPATH/PluginsAndFeatures/AddLibrary/AzureLibraries/pom.xml -Dmaven.repo.local=$SCRIPTPATH/.repository $MAVEN_QUIET
# # Build eclipse plugin
mvn package -f $SCRIPTPATH/PluginsAndFeatures/azure-toolkit-for-eclipse/pom.xml $MAVEN_QUIET
cp ./PluginsAndFeatures/azure-toolkit-for-eclipse/WindowsAzurePlugin4EJ/target/WindowsAzurePlugin4EJ*.zip ./$ARTIFACTS_DIR/WindowsAzurePlugin4EJ.zip
chmod +x ./gradlew
chmod +x ./tools/IntellijVersionHelper
# Build intellij 2016 plugin
if [ $INTELLIJ_VERSION == "true" ] ; then
./tools/IntellijVersionHelper 2016.3
fi
./gradlew buildPlugin --project-dir ./PluginsAndFeatures/azure-toolkit-for-intellij -s -Pintellij_version=IU-2016.3
cp ./PluginsAndFeatures/azure-toolkit-for-intellij/build/distributions/azure-toolkit-for-intellij.zip ./$ARTIFACTS_DIR/azure-toolkit-for-intellij-2016.zip
# Build intellij 2017 plugin
if [ $INTELLIJ_VERSION == "true" ] ; then
./tools/IntellijVersionHelper 2017.1
fi
./gradlew buildPlugin --project-dir ./PluginsAndFeatures/azure-toolkit-for-intellij -s
cp ./PluginsAndFeatures/azure-toolkit-for-intellij/build/distributions/azure-toolkit-for-intellij.zip ./$ARTIFACTS_DIR/azure-toolkit-for-intellij-2017.zip
echo "ALL BUILD SUCCESSFUL"