Last active
December 10, 2015 17:08
-
-
Save jiemachina/4465609 to your computer and use it in GitHub Desktop.
channel build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
# -*- coding: utf-8 -*- | |
def writeFile(filename, content): | |
outfile = open(filename, "w") | |
outfile.write(content) | |
outfile.close() | |
def build(versionString): | |
xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" | |
xmlResH = "<resources>\n\t" | |
xmlEnd = "</resources>" | |
f = open("channel.txt") | |
line= f.readline() | |
while line: | |
line = line.strip() | |
xmlChannel = "<string name=\"channel\"> "+ line+"</string>\n" | |
writeFile("res/values/channel.xml", xmlHeader + xmlResH + xmlChannel + xmlEnd) | |
print line | |
os.system("rm -rf bin") | |
os.system("ant release") | |
os.system("cp bin/readfriend-release.apk channel/readfriend-release-"+line + "-" +versionString+".apk") | |
line = f.readline() | |
f.close() | |
build("1.0.11"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment