Skip to content

Commit

Permalink
travis: create file with commit hash
Browse files Browse the repository at this point in the history
gradle: build dev and source jars
  • Loading branch information
LepkoQQ committed Jun 21, 2014
1 parent d6e4146 commit c3e1ab1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
5 changes: 3 additions & 2 deletions upload_files_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit c3e1ab1

Please sign in to comment.