Permalink
Browse files

Look up password right at the start of the nightly build script.

That way we can tell if keychain is set up wrong before we do the entire build. Also print more information during generation of nightly builds.
  • Loading branch information...
uliwitness committed Apr 2, 2016
1 parent 69747ca commit e5b488976969e248387c2a77614fc0ac692ccfa0
Showing with 12 additions and 3 deletions.
  1. +7 −3 nightly_build_and_upload.command
  2. +5 −0 writerss.php
@@ -8,27 +8,31 @@ touch Stacksmith-Info.plist
cd ${REPO_DIR}/../
BUILD_DEST_PATH=`pwd`/Output/
SIGN_SCRIPT=${REPO_DIR}/Sparkle/bin/sign_update
mkdir ${BUILD_DEST_PATH}
rm -rf ${BUILD_DEST_PATH}/*
##security unlock-keychain -p 'password' ~/Library/Keychains/login.keychain
##xcodebuild CONFIGURATION_BUILD_DIR=$BUILD_DEST_PATH \
## GCC_PREPROCESSOR_DEFINITIONS="SVN_VERSION_NUM=${BUILD_NUMBER} SVN_BUILD_MEANS=nightly" \
## INFOPLIST_PREPROCESSOR_DEFINITIONS="SVN_VERSION_NUM=${BUILD_NUMBER} SVN_BUILD_MEANS=nightly" \
## CODE_SIGN_IDENTITY="Developer ID Application: Your Name" \
## -configuration Release \
## clean build
PASSWORD=`security 2>&1 >/dev/null find-internet-password -ga jnknsuliwitness | cut -f2 -d'"'`
mkdir ${BUILD_DEST_PATH}
rm -rf ${BUILD_DEST_PATH}/*
cd ${REPO_DIR}/Stacksmith/
xcodebuild CONFIGURATION_BUILD_DIR=$BUILD_DEST_PATH \
WILD_DEFINES_FROM_XCODEBUILD="SVN_VERSION_NUM=${BUILD_NUMBER} SVN_BUILD_MEANS=nightly" \
WILD_INFO_PLIST_DEFINES_FROM_XCODEBUILD="SVN_VERSION_NUM=${BUILD_NUMBER} SVN_BUILD_MEANS=nightly" \
-configuration Release \
clean build || exit 1
cd ${BUILD_DEST_PATH}
echo "$(tput setaf 6)$(tput bold)===== Compressing Build Product =====$(tput sgr0)"
echo "File: $BUILD_DEST_PATH/Stacksmith.tgz"
tar -czf Stacksmith.tgz Stacksmith.app
PASSWORD=`security 2>&1 >/dev/null find-internet-password -ga jnknsuliwitness | cut -f2 -d'"'`
echo "$(tput setaf 6)$(tput bold)===== Generating RSS Feed =====$(tput sgr0)"
cd ${REPO_DIR}
${REPO_DIR}/writerss.php ${BUILD_DEST_PATH}/Stacksmith.app/Contents/Info.plist nightly ${BUILD_DEST_PATH}/Stacksmith.tgz `${SIGN_SCRIPT} ${BUILD_DEST_PATH}/Stacksmith.tgz "/Volumes/Confidential/Sparkle Keys/stacksmith_private_sparkle_dsa_key.pem"`
cd ${BUILD_DEST_PATH}
mv nightly_feed.rss stacksmith_nightlies.rss
echo "$(tput setaf 6)$(tput bold)===== Uploading =====$(tput sgr0)"
ftp -in -u "ftp://jnknsuliwitness:${PASSWORD}@stacksmith.org/stacksmith.org/nightlies/" Stacksmith.tgz
ftp -in -u "ftp://jnknsuliwitness:${PASSWORD}@stacksmith.org/stacksmith.org/nightlies/" stacksmith_nightlies.rss
@@ -43,6 +43,9 @@
preg_match( '/<string>(.*)?<\\/string>/', $infoplist, $matches, 0, $newoffs );
$theversion = $matches[1];
echo " Version: $theversion\n";
echo " Build: $argv[2]\n";
$actualversion = $theversion;
$feedstr = "<?xml version=\"1.0\"?>
<rss version=\"2.0\"
@@ -65,4 +68,6 @@
$fd = fopen($fpath,"w");
fwrite($fd,$feedstr);
fclose($fd);
echo "Written to: $fpath\n";
?>

0 comments on commit e5b4889

Please sign in to comment.