Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
60 lines (44 sloc) 1.54 KB
#
# groovy turbo.me file
# https://github.com/turboapps/turbome/tree/master/groovy
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
meta title="Groovy"
meta namespace="pivotal"
meta name="groovy"
###################################
# Pull dependency images
###################################
layer jre:7.51
using wget,7-zip,python:3.4.1
###################################
# Download and install
###################################
cmd pip install requests --quiet
cmd mkdir c:\Workspace
workdir c:\Workspace
batch
echo import sys > getTag.py
echo import requests >> getTag.py
echo import re >> getTag.py
echo host = 'http://www.groovy-lang.org/download.html' >> getTag.py
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >> getTag.py
echo r = requests.get(host , headers=headers, timeout=10) >> getTag.py
echo print(re.findall('(\d*\.\d*\.\d*) distributions', r.text )[0]) >> getTag.py
cmd python getTag.py
var tag = last
var url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-" + tag + ".zip"
cmd "wget --no-check-certificate -O groovy-binary.zip %url%"
cmd 7z x groovy-binary.zip -oc:\Groovy
env GROOVY_HOME="c:/Groovy/groovy-" + tag
env spn_groovy="c:/Groovy/groovy-" + tag + "/bin/groovy"
env PATH="%PATH%;C:/Groovy/groovy-" + tag + "/bin/"
###################################
# Clean up
###################################
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\wget /s /q
cmd rmdir c:\Python34 /s /q
meta tag=tag