mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Make set-version script to update Eclipse plugin version
This commit is contained in:
parent
02f61b5d50
commit
bac8336709
13
.travis.yml
13
.travis.yml
|
@ -22,13 +22,17 @@ branches:
|
|||
before_install:
|
||||
- nvm install 7
|
||||
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download)"`
|
||||
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
|
||||
- BASE_VERSION=${OLD_VERSION%-SNAPSHOT}
|
||||
- NEW_VERSION=${BASE_VERSION}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
|
||||
- ECLIPSE_VERSION-${BASE_VERSION}.dev_`printf %d $TRAVIS_BUILD_NUMBER`
|
||||
- export NEW_VERSION
|
||||
- export ECLIPSE_VERSION
|
||||
- export BASE_VERSION
|
||||
- echo "Building version $NEW_VERSION"
|
||||
- mvn versions:set -DnewVersion=$NEW_VERSION
|
||||
- ./set-version.sh $NEW_VERSION $ECLIPSE_VERSION
|
||||
|
||||
install:
|
||||
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
- mvn install -Dteavm.build.all=false -P with-idea -P with-eclipse -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
- pushd tests/src/test/js
|
||||
- npm config set prefix=$HOME/.node_modules
|
||||
- npm install
|
||||
|
@ -56,8 +60,7 @@ after_success: >
|
|||
export TEAVM_FTP_LOGIN
|
||||
export TEAVM_FTP_PASSWORD
|
||||
mvn deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml -P deploy-to-bintray -P with-idea && \
|
||||
./update-idea-repository.sh
|
||||
./update-cli.sh
|
||||
./upload-files.sh
|
||||
fi
|
||||
after_script:
|
||||
- rm -rf $HOME/.m2/repository/org/teavm
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false
|
||||
|
||||
pushd tools/eclipse
|
||||
mvn tycho-versions:set-version -DnewVersion=$2
|
||||
|
||||
pushd core-plugin
|
||||
sed -r -i -e "s/<version><!-- update -->(.+)<\/version>/<version><!-- update -->$1<\/version>/" dep-pom.xml
|
||||
sed -r -i -e "s/(lib\/teavm(-[a-z]+)+)-.+\.jar/\1-$1.jar/" build.properties
|
||||
sed -r -i -e "s/(lib\/teavm(-[a-z]+)+)-.+\.jar/\1-$1.jar/" META-INF/MANIFEST.MF
|
||||
popd
|
||||
|
||||
pushd m2e-plugin
|
||||
sed -r -i -e "s/<versionRange>.+<\/versionRange>/<versionRange>$1<\/versionRange>/" lifecycle-mapping-metadata.xml
|
||||
popd
|
||||
|
||||
popd
|
||||
|
||||
|
|
|
@ -48,6 +48,15 @@
|
|||
</repositories>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-versions-plugin</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
curl --ftp-create-dirs -T tools/cli/target/teavm-cli-$NEW_VERSION.jar \
|
||||
-u $TEAVM_FTP_LOGIN:$TEAVM_FTP_PASSWORD \
|
||||
ftp://$TEAVM_FTP_HOST/httpdocs/cli/dev/teavm-cli-$NEW_VERSION.jar
|
|
@ -1,5 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Upload CLI
|
||||
#
|
||||
curl --ftp-create-dirs -T tools/cli/target/teavm-cli-$NEW_VERSION.jar \
|
||||
-u $TEAVM_FTP_LOGIN:$TEAVM_FTP_PASSWORD \
|
||||
ftp://$TEAVM_FTP_HOST/httpdocs/cli/dev/teavm-cli-$NEW_VERSION.jar
|
||||
|
||||
|
||||
#
|
||||
# Update IDEA repository descriptor
|
||||
#
|
||||
cat <<EOF >.idea-repository.xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugins>
|
||||
|
@ -13,3 +24,13 @@ EOF
|
|||
curl --ftp-create-dirs -T .idea-repository.xml \
|
||||
-u $TEAVM_FTP_LOGIN:$TEAVM_FTP_PASSWORD \
|
||||
ftp://$TEAVM_FTP_HOST/httpdocs/idea/dev/teavmRepository.xml
|
||||
|
||||
|
||||
#
|
||||
# Upload Eclipse plugin
|
||||
#
|
||||
pushd tools/eclipse/updatesite/target/repository
|
||||
find . -type f -exec curl \
|
||||
--ftp-create-dirs \
|
||||
-u $TEAVM_FTP_LOGIN:$TEAVM_FTP_PASSWORD -T {} ftp://$TEAVM_FTP_HOST/httpdocs/eclipse/update-site/$BASE_VERSION-dev \;
|
||||
popd
|
Loading…
Reference in New Issue
Block a user