mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-12-15 02:10:30 +08:00
Update deployment script
This commit is contained in:
parent
e3da484f79
commit
dd0b9f70df
@ -14,4 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
group = "org.teavm"
|
plugins {
|
||||||
|
idea
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "org.teavm"
|
||||||
|
|
||||||
|
idea.module.excludeDirs.add(File(rootDir, "build-dir"))
|
37
deploy.sh
37
deploy.sh
@ -15,7 +15,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
mkdir -p build-dir
|
mkdir -p build-dir
|
||||||
mkdir -p build-cache/maven-repository
|
|
||||||
|
|
||||||
git fetch
|
git fetch
|
||||||
git archive master | tar -x -C build-dir || { echo 'Git archive failed' ; exit 1; }
|
git archive master | tar -x -C build-dir || { echo 'Git archive failed' ; exit 1; }
|
||||||
@ -44,14 +43,25 @@ function deploy_teavm {
|
|||||||
|
|
||||||
echo "Building version $TEAVM_DEPLOY_VERSION_FULL"
|
echo "Building version $TEAVM_DEPLOY_VERSION_FULL"
|
||||||
|
|
||||||
./gradlew build || { echo 'Build failed' ; return 1; }
|
GRADLE="./gradlew"
|
||||||
./gradlew publishAllPublicationsToMavenRepository || { echo 'Deploy failed' ; return 1; }
|
GRADLE+=" --no-daemon --no-configuration-cache"
|
||||||
|
GRADLE+=" -Pteavm.project.version=$TEAVM_DEPLOY_VERSION_FULL"
|
||||||
|
GRADLE+=" -Pteavm.publish.url=sftp://$TEAVM_DEPLOY_SERVER/maven/repository"
|
||||||
|
GRADLE+=" -Pteavm.publish.username=$TEAVM_DEPLOY_LOGIN"
|
||||||
|
GRADLE+=" -Pteavm.publish.password=$TEAVM_DEPLOY_PASSWORD"
|
||||||
|
|
||||||
|
$GRADLE build -x test || { echo 'Build failed' ; return 1; }
|
||||||
|
$GRADLE publishAllPublicationsToTeavmRepository || { echo 'Deploy failed' ; return 1; }
|
||||||
|
|
||||||
|
curl -T tools/idea/build/distributions/idea-$TEAVM_DEPLOY_VERSION_FULL.zip \
|
||||||
|
sftp://$TEAVM_DEPLOY_SERVER/idea/teavm-idea-$TEAVM_DEPLOY_VERSION_FULL.zip \
|
||||||
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
|
|
||||||
cat <<EOF >idea-repository.xml
|
cat <<EOF >idea-repository.xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin id="org.teavm.idea" url="https://teavm.org/maven/repository/org/teavm/teavm-idea/$TEAVM_DEPLOY_VERSION_FULL/teavm-idea-$TEAVM_DEPLOY_VERSION_FULL.zip" version="$TEAVM_DEPLOY_VERSION_FULL">
|
<plugin id="org.teavm.idea" url="https://teavm.org/idea/teavm-idea-$TEAVM_DEPLOY_VERSION_FULL.zip" version="$TEAVM_DEPLOY_VERSION_FULL">
|
||||||
<idea-version since-build="182.*" until-build="223.*" />
|
<idea-version since-build="201.*" until-build="232.*" />
|
||||||
<description>TeaVM support</description>
|
<description>TeaVM support</description>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
@ -59,7 +69,7 @@ EOF
|
|||||||
|
|
||||||
curl --output badge.svg "https://img.shields.io/static/v1?label=download&message=$TEAVM_DEPLOY_VERSION_FULL&color=green"
|
curl --output badge.svg "https://img.shields.io/static/v1?label=download&message=$TEAVM_DEPLOY_VERSION_FULL&color=green"
|
||||||
cat <<EOF >htaccess
|
cat <<EOF >htaccess
|
||||||
Redirect /maven/_latest /maven/repository/org/teavm/teavm-cli/$TEAVM_DEPLOY_VERSION_FULL/teavm-cli-$TEAVM_DEPLOY_VERSION_FULL.jar
|
Redirect /maven/_latest /maven/repository/org/teavm/teavm-cli/$TEAVM_DEPLOY_VERSION_FULL/teavm-cli-$TEAVM_DEPLOY_VERSION_FULL-all.jar
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$TEAVM_DEPLOY_BUILD" >build-number.txt
|
echo "$TEAVM_DEPLOY_BUILD" >build-number.txt
|
||||||
@ -72,23 +82,22 @@ deploy_teavm
|
|||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
if [[ "$EXIT_CODE" == '0' ]] ; then
|
if [[ "$EXIT_CODE" == '0' ]] ; then
|
||||||
curl -T build-number.txt \
|
curl -T build-number.txt \
|
||||||
ftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION.txt \
|
sftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION.txt \
|
||||||
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
curl -T commit-id.txt \
|
curl -T commit-id.txt \
|
||||||
ftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION_FULL-commit.txt \
|
sftp://$TEAVM_DEPLOY_SERVER/maven/versions/$TEAVM_DEPLOY_VERSION_FULL-commit.txt \
|
||||||
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
curl -T badge.svg \
|
curl -T badge.svg \
|
||||||
ftp://$TEAVM_DEPLOY_SERVER/maven/badge.svg \
|
sftp://$TEAVM_DEPLOY_SERVER/maven/badge.svg \
|
||||||
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
curl -T htaccess \
|
curl -T htaccess \
|
||||||
ftp://$TEAVM_DEPLOY_SERVER/maven/.htaccess \
|
sftp://$TEAVM_DEPLOY_SERVER/maven/.htaccess \
|
||||||
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
curl -T idea-repository.xml \
|
curl -T idea-repository.xml \
|
||||||
ftp://$TEAVM_DEPLOY_SERVER/idea/dev/teavmRepository.xml \
|
sftp://$TEAVM_DEPLOY_SERVER/idea/dev/teavmRepository.xml \
|
||||||
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
--user $TEAVM_DEPLOY_LOGIN:$TEAVM_DEPLOY_PASSWORD
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -rf build-dir
|
#rm -rf build-dir
|
||||||
rm -rf build-cache/maven-repository/org/teavm
|
#exit $EXIT_CODE
|
||||||
exit $EXIT_CODE
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
`java-gradle-plugin`
|
`java-gradle-plugin`
|
||||||
publishing
|
publishing
|
||||||
`maven-publish`
|
`teavm-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
Loading…
Reference in New Issue
Block a user