Skip to content

Commit

Permalink
#47: lra build script fixes (#46)
Browse files Browse the repository at this point in the history
* added LRA color plugin to build script

* tag script update

* added sleep

* added lra to build.py deploy
  • Loading branch information
funkyzooink authored Nov 19, 2019
1 parent 8b1f90a commit 3a624b3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
15 changes: 14 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
def terminal_output(text):
print text

def copy_color_plugin(config_file_path):
# TODO this is only for LRA - refactor
src = config_file_path + '/code'
if os.path.isdir(src):
terminal_output('copy color plugin')
shutil.copyfile(src + '/ColorPlugin.h', 'Classes/Helpers/ColorPlugin.h')
shutil.copyfile(src + '/ColorPlugin.cpp', 'Classes/Helpers/ColorPlugin.cpp')

def copy_resources(config_file_path, android_platform):
src = config_file_path + '/Resources' #todo
dest = 'Resources'
Expand Down Expand Up @@ -184,20 +192,24 @@ def ci_build():

if "little-ninja" in tagname:
project_path = "examples/little-ninja/"
elif "little-robot-adventure" in tagname:
project_path = "examples/little-robot-adventure/"
elif "the-dragon-kid" in tagname:
project_path = "examples/the-dragon-kid/"
elif "4friends" in tagname:
project_path = "examples/4friends/"

project_copy_helper(project_path, 'play')

def ci_deploy():
def ci_deploy(): # TODO for fastlane

if os.environ.get('TRAVIS_TAG'):
tagname = os.environ["TRAVIS_TAG"]

if "little-ninja" in tagname:
project_path = "examples/little-ninja/"
elif "little-robot-adventure" in tagname:
project_path = "examples/little-robot-adventure/"
elif "the-dragon-kid" in tagname:
project_path = "examples/the-dragon-kid/"
elif "4friends" in tagname:
Expand All @@ -213,6 +225,7 @@ def project_copy_helper(config_file_path, android_platform):
copy_templates()
prepare_templates(app_name, android_bundle_id, ios_bundle_id, version_name)
copy_resources(config_file_path, android_platform)
copy_color_plugin(config_file_path)

def main(argv):
platform = ''
Expand Down
11 changes: 10 additions & 1 deletion create_tags.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash

version=$(git rev-list HEAD --count)
# create and push tag then wait 30s - otherwise travis ignores tags
git tag "release-little-ninja-v$version"
git push origin --tags
sleep 30

git tag "release-little-robot-adventure-v$version"
git push origin --tags
sleep 30

git tag "release-the-dragon-kid-v$version"
git push origin --tags
git push origin --tags
sleep 30

0 comments on commit 3a624b3

Please sign in to comment.