Cocos2dx를 Jenkins에 등록할 때의 쉘 예

5620 단어 Jenkinscocos2d-x

개요



Cocos2dx로 빌드를 자동화할 때의 쉘 설정.
어떤 패턴이 좋은지는 시험 중.
shenzhen은 빌드 로그를 토하지 않을 수 있습니다.
cocos compile의 iOS 빌드로 mobileprovision 지정 할 수 없다든가 왜! ?
github의 project_compile.py 에도 embed 옵션 쓰지 않았구나. .
빌드할 때 전환하자. .

Jenkins의 ant와 연계하여 APK 생성


# ANDROID BUILD
export NDK_ROOT=/Applications/android-ndk-r9d
export ANDROID_SDK_ROOT=/Applications/adt-bundle-mac-x86_64/sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools

cd $WORKSPACE/cocos2d/cocos/platform/android/java/
android update project -p . -t 1

cd $WORKSPACE/proj.android
android update project -p . -t 1
#android update project --path . --target android-19

# keytoolの情報
echo "key.store=hoge.keystore\nkey.store.password=password\nkey.alias=hoge\nkey.alias.password= password" >> ant.properties

./build_native.py



shenzhen을 사용하여 IPA 생성


# iOS BUILD
PROVISIONING_FILE_PATH=$HOME/Builds/Keys/$JOB_NAME.mobileprovision
SCHEME_NAME="$JOB_NAME iOS"
cd $WORKSPACE/proj.ios_mac
/usr/bin/ipa build -c Release -i "iPhone Distribution: xxxxx" -m $PROVISIONING_FILE_PATH -s "${SCHEME_NAME}"  --clean

cocos compile을 사용하여 APK 생성


# ANDROID BUILD
export NDK_ROOT=/Applications/android-ndk-r9d
export ANDROID_SDK_ROOT=/Applications/adt-bundle-mac-x86_64/sdk
export COCOS_CONSOLE_ROOT=/Applications/cocos2d-x-3.2/tools/cocos2d-console/bin
export ANT_ROOT=$HOME/jenkins/tools/hudson.tasks.Ant_AntInstallation/JenkinsAnt/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$COCOS_CONSOLE_ROOT:$ANT_ROOT

cd $WORKSPACE/proj.android

# keytoolの情報
echo "key.store=hoge.keystore\nkey.store.password=password\nkey.alias=hoge\nkey.alias.password= password" >> ant.properties

cocos compile -s $WORKSPACE -p android --ndk-mode release --ap 19 -m release

cocos compile을 사용하여 IPA 생성


# iOS BUILD
export COCOS_CONSOLE_ROOT=/Applications/cocos2d-x-3.2/tools/cocos2d-console/bin
export PATH=$PATH:$COCOS_CONSOLE_ROOT

cocos compile -s $WORKSPACE -p ios -m release --sign-identity "iPhone Distribution: xxxxx"

좋은 웹페이지 즐겨찾기