forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild-robovm-studio.sh
executable file
·36 lines (31 loc) · 1.45 KB
/
build-robovm-studio.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
#/bin/sh
./getPlugins.sh
set -e
: ${IDEA_HOME?"Need to set IDEA_HOME to point to a valid IntelliJ IDEA installation."}
## Build the RoboVM IDEA plugin
cd robovm/robovm-idea
awk '!/idea-version/' src/main/resources/META-INF/plugin.xml > plugin.xml.tmp && mv plugin.xml.tmp src/main/resources/META-INF/plugin.xml
mvn -Didea.home="$IDEA_HOME" clean package -U -Pdeployment
git checkout -- src/main/resources/META-INF/plugin.xml
cd ../..
## Apply versioning to IdeaApplicationInfo.xml based on
## version found in robovm-idea/pom.xml. The version
## is defined by the ROBOVM_IDEA_PLUGIN_VERSION environment
## variable, based on which the respective tag will be
## pulled in
javac -d . robovm/robovm-studio-branding/src/Versioning.java
version=$(java -cp . Versioning robovm/robovm-idea/pom.xml robovm/robovm-studio-branding/src/idea/IdeaApplicationInfo.xml robovm/robovm-studio-dmg/dmg.json)
rm Versioning.class
## Build IntelliJ IDEA using our own build files
ant -f build-robovm.xml
rm -rf out/robovm-studio
mkdir -p out/robovm-studio
## Copy the artifacts and build the DMG
cp out/artifacts/*.mac.zip out/robovm-studio/robovm-studio-$version.zip
cd out/robovm-studio
unzip robovm-studio-$version.zip
cd ../..
appdmg robovm/robovm-studio-dmg/dmg.json out/robovm-studio/robovm-studio-$version.dmg
## Revert the IdeaApplicationInfo.xml and dmg.json file
git checkout -- robovm/robovm-studio-branding/src/idea/IdeaApplicationInfo.xml
git checkout -- robovm/robovm-studio-dmg/dmg.json