From c3e1ab1fe6e22d69e4083e75e45e6f9aace7f32e Mon Sep 17 00:00:00 2001 From: LepkoQQ Date: Sun, 22 Jun 2014 00:51:01 +0200 Subject: [PATCH] travis: create file with commit hash gradle: build dev and source jars --- build.gradle | 15 +++++++++++++++ upload_files_travis.sh | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2386bbc..7016584 100644 --- a/build.gradle +++ b/build.gradle @@ -56,3 +56,18 @@ processResources exclude "mcmod.info" } } + +task sourceJar(type: Jar) { + from sourceSets.main.allSource + classifier = 'src' +} + +// Add in an mcp named jar, for those who wish to run in a development environment (assuming mcp naming matches) +task devJar(type: Jar) { + from sourceSets.main.output + classifier = 'dev' +} + +artifacts { + archives sourceJar, devJar +} diff --git a/upload_files_travis.sh b/upload_files_travis.sh index 81eceeb..63e8005 100644 --- a/upload_files_travis.sh +++ b/upload_files_travis.sh @@ -4,8 +4,9 @@ dir="./build/libs" if [ -d "$dir" ] then cd "$dir" - curl --remote-name http://mods.lepko.net/archive/travis/easycrafting/buildinfo.txt - echo "$TRAVIS_BUILD_NUMBER,$TRAVIS_COMMIT" >> buildinfo.txt + THEFILE=$(ls -t *.jar | head -n 1) + THEFILE=${THEFILE/.jar/.commit} + echo $TRAVIS_COMMIT > $THEFILE find . -type f -exec curl --user $FTP_USER:$FTP_PASSWORD --ftp-create-dirs -T {} ftp://lepko.net/domains/lepko.net/public_html/mods/archive/travis/easycrafting/{} \; else echo "Error: $dir not found."