Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
60 lines (43 sloc) 1.27 KB
#
# Ant Spoon.me file
# https://github.com/spoonapps/spoonme/tree/master/ant
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
###################################
# Meta tags
###################################
meta title="Ant"
meta namespace="apache"
meta name="ant"
###################################
# Pull dependency images
###################################
using wget,python:3.4.1,7-zip
cmd pip install requests --quiet
cmd mkdir c:\Workspace
workdir c:\Workspace
batch
echo import sys > getRelease.py
echo import requests >> getRelease.py
echo import re >> getRelease.py
echo r = requests.get('http://ant.apache.org/bindownload.cgi') >> getRelease.py
echo print(list(re.findall('(http.*?(\d*\.\d*\.\d*)-bin.zip)', r.text )[0])) >> getRelease.py
cmd python getRelease.py
var data = last
cmd "python -c ""print( %data% [0])"""
var url = last
cmd "python -c ""print( %data% [1])"""
var tag = last
cmd "wget -O ant.zip --no-check-certificate %url%"
cmd "7z x ant.zip -oC:\Ant"
env PATH = "c:\Ant\apache-ant-" + tag + "\bin"
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\wget /s /q
cmd rmdir c:\Python34 /s /q
###################################
# Version
###################################
meta tag=tag
meta version=tag