Updated scripts to remove any modified artifacts from Res directory.
Not doing it causes side effects on the testsuite.
This commit is contained in:
@@ -7,10 +7,13 @@ from optparse import OptionParser
|
||||
def createResZipFile(filename):
|
||||
|
||||
utilities = ZipUtilities()
|
||||
rename = False
|
||||
if not os.path.isfile('settings/options.txt'):
|
||||
os.rename('settings/options.orig.txt', 'settings/options.txt')
|
||||
remame = True
|
||||
if not os.path.isfile('player/options.txt'):
|
||||
os.rename('player/options.orig.txt', 'player/options.txt')
|
||||
rename = True
|
||||
|
||||
zip_file = zipfile.ZipFile(filename, 'w', zipfile.ZIP_STORED)
|
||||
utilities.addFolderToZip(zip_file, 'themes')
|
||||
@@ -25,6 +28,10 @@ def createResZipFile(filename):
|
||||
utilities.addFolderToZip(zip_file, 'campaigns')
|
||||
utilities.addFolderToZip(zip_file, 'ai')
|
||||
zip_file.close()
|
||||
|
||||
if rename:
|
||||
os.rename('settings/options.txt', 'settings/options.orig.txt')
|
||||
os.rename('player/options.txt', 'player/options.orig.txt')
|
||||
|
||||
def getFilename():
|
||||
p = Properties();
|
||||
|
||||
@@ -39,7 +39,9 @@ make -j 8
|
||||
# we create resource package
|
||||
cd projects/mtg/bin/Res
|
||||
python createResourceZip.py
|
||||
mv core_*.zip core.zip
|
||||
# if we let the zip here, Wagic will use it in the testsuite
|
||||
# and we'll get 51 failed test cases
|
||||
mv core_*.zip ../../../../core.zip
|
||||
cd ../../../..
|
||||
|
||||
# Now we run the testsuite (Res needs to be in the working directory)
|
||||
|
||||
@@ -9,7 +9,7 @@ if [ "$TRAVIS_BRANCH" == "alphas" ]; then
|
||||
curl -X POST -H "Authorization: token ${GH_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary @projects/mtg/bin/Res/core.zip \
|
||||
--data-binary @core.zip \
|
||||
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core-${TRAVIS_BUILD_NUMBER}.zip"
|
||||
|
||||
echo -e "Uploading android package\n"
|
||||
|
||||
Reference in New Issue
Block a user