Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
96 lines (71 sloc) 2.47 KB
#
# Gradle nightly turbo.me file
# https://github.com/turboapps/turbome/tree/master/gradle/nightly/turbo.me
#
# Created with Turbo CMD version 1.4.1106.0
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
###################################
# Meta tags
###################################
meta title="Gradle nightly"
meta namespace="gradle"
meta name="gradle-nightly"
###################################
# Pull dependency images
###################################
using gnu/wget,7-zip/7-zip,python/python:3.4.1
###################################
# Download and install
###################################
# Set working directory
cmd mkdir c:\Workspace
workdir c:\Workspace
# Get URL from web
cmd pip install requests --quiet
batch
echo import requests >> getUrl.py
echo import re >> getUrl.py
echo host = 'http://gradle.org/nightly' >> getUrl.py
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getUrl.py
echo r = requests.get(host , headers=headers, timeout=10) >> getUrl.py
echo url = ''.join(list(re.findall('(https://\S*-bin.zip)', r.text)[0])) >> getUrl.py
echo print(url) >> getUrl.py
cmd python getUrl.py
var url = last
# Download
cmd "wget --no-check-certificate --no-verbose -O gradle.zip %url%"
# Unpack
cmd 7z x gradle.zip -oc:\gradle
# Get version
batch
echo import requests >> getVersion.py
echo import re >> getVersion.py
echo host = 'http://gradle.org/nightly' >> getVersion.py
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getVersion.py
echo r = requests.get(host , headers=headers, timeout=10) >> getVersion.py
echo version = ''.join(list(re.findall('gradleVersion = "(.*)\+.*"', r.text)[0])) >> getVersion.py
echo print(version) >> getVersion.py
cmd python getVersion.py
var version = last
###################################
# Environment Variables
###################################
env path="c:\gradle\gradle-" + version + "+0000\bin"
###################################
# Clean up
###################################
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir C:\wget /s /q
cmd rmdir C:\python34 /s /q
###################################
# Version
###################################
meta tag=version
meta version=version
###################################
# Startup File
###################################
startup file ("cmd","/k echo Gradle nightly version: ", version)