Add IDEA plugin build to travis config

This commit is contained in:
Alexey Andreev 2017-02-18 20:18:17 +03:00
parent b4e88988f6
commit 036a805837
3 changed files with 33 additions and 3 deletions

View File

@ -9,13 +9,13 @@ branches:
- master - master
- /^release-.+$/ - /^release-.+$/
- /^dev-.+/ - /^dev-.+/
env:
- MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
before_install: before_install:
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"` - OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER` - NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
- echo "Building version $NEW_VERSION" - echo "Building version $NEW_VERSION"
- mvn versions:set -DnewVersion=$NEW_VERSION - mvn versions:set -DnewVersion=$NEW_VERSION
install:
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script: > script: >
mvn -e test \ mvn -e test \
-Dteavm.junit.target=target/js-tests \ -Dteavm.junit.target=target/js-tests \
@ -25,7 +25,12 @@ script: >
-Dteavm.junit.minified=true -Dteavm.junit.minified=true
after_success: > after_success: >
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
mvn deploy --settings travis-settings.xml -P deploy-to-bintray export NEW_VERSION
export TEAVM_FTP_HOST
export TEAVM_FTP_LOGIN
export TEAVM_FTP_PASSWORD
mvn deploy -Dteavm.build.all=false --settings travis-settings.xml -P deploy-to-bintray -P with-idea && \
./update-idea-repository.sh
fi fi
after_script: after_script:
- rm -rf $HOME/.m2/repository/org/teavm - rm -rf $HOME/.m2/repository/org/teavm

View File

@ -300,6 +300,13 @@
<module>tools/idea</module> <module>tools/idea</module>
</modules> </modules>
</profile> </profile>
<profile>
<id>with-idea</id>
<modules>
<module>tools/idea</module>
</modules>
</profile>
<profile> <profile>
<id>sign-artifacts</id> <id>sign-artifacts</id>
<build> <build>

18
update-idea-repository.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
cat <<EOF >.idea-repository.xml
<?xml version="1.0" encoding="UTF-8"?>
<plugins>
<plugin id="org.teavm.idea" url="https://dl.bintray.com/konsoletyper/teavm/org/teavm/teavm-idea-plugin/$NEW_VERSION/teavm-idea-plugin-$NEW_VERSION.zip" version="$NEW_VERSION">
<idea-version since-build="163.12024.16" until-build="172.*" />
<description>TeaVM support</description>
</plugin>
</plugins>
EOF
ftp -nv $TEAVM_FTP_HOST <<EOF
quot USER $TEAVM_FTP_LOGIN
quot PASS $TEAVM_FTP_PASSWORD
put .idea-repository.xml httpdocs/idea/dev/teavmRepository.xml
quit
EOF