Changeset 25879


Ignore:
Timestamp:
12/17/20 10:17:01 (4 years ago)
Author:
jdquinn
Message:

CHG: More adjustments to macOS packaging scripts

Location:
issm/trunk-jpl/packagers/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-matlab.sh

    r25875 r25879  
    105105                --password ${PASSWORD} \
    106106                ${SIGNED_REPO_URL} \
    107                 ${SIGNED_REPO_COPY}
     107                ${SIGNED_REPO_COPY} > /dev/null 2>&1
    108108}
    109109checkout_unsigned_repo_copy(){
     
    115115                --password ${PASSWORD} \
    116116                ${UNSIGNED_REPO_URL} \
    117                 ${UNSIGNED_REPO_COPY}
     117                ${UNSIGNED_REPO_COPY} > /dev/null 2>&1
    118118}
    119119validate_signed_repo_copy(){
     
    246246                        # Check that MATLAB did not exit in error
    247247                        matlabExitCode=`echo $?`
    248                         matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
     248                        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run" matlab.log | wc -l`
    249249
    250250                        if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     
    306306                --message "ADD: New lock file" ${SIGNED_REPO_COPY}
    307307
    308         # Save current working copy revision number
    309         svn up ${SIGNED_REPO_COPY}
    310         CURRENT_REV=$(svn info --show-item last-changed-revision ${SIGNED_REPO_COPY})
    311 
    312         # Check out copy of SVN repository for unsigned packages
     308        # Check out copy of repository for unsigned packages
    313309        checkout_unsigned_repo_copy
    314310
     
    335331                echo "Attempting to sign existing package again"
    336332                echo $(date +'%Y-%m-%d-%H-%M-%S') > ${UNSIGNED_REPO_COPY}/${RETRIGGER_SIGNING_FILE} # Write datetime stamp to file to ensure modification is made
    337                 svn add ${UNSIGNED_REPO_COPY}/${RETRIGGER_SIGNING_FILE} > /dev/null 2>&1
     333                svcheckout_unsigned_repo_copyn add ${UNSIGNED_REPO_COPY}/${RETRIGGER_SIGNING_FILE} > /dev/null 2>&1
    338334                svn commit \
    339335                        --trust-server-cert \
     
    353349                sleep ${SIGNING_CHECK_PERIOD}
    354350                svn up ${SIGNED_REPO_COPY}
    355                 NEW_REV=$(svn info --show-item last-changed-revision ${SIGNED_REPO_COPY})
    356 
    357                 if [ ${NEW_REV} -ne ${CURRENT_REV} ]; then
     351
     352                if [ ! -f ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} ]; then
    358353                        IN_PROCESS=0
    359354
     355                        # Retrieve notarization lock file
    360356                        svn up ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE}
    361                         svn up ${SIGNED_REPO_COPY}/${COMPRESSED_PKG}
    362 
    363                         # No error, so check status
     357
     358                        # Check status
    364359                        STATUS=$(grep 'Status:' ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} | sed -e 's/[[:space:]]*Status: //')
    365360                        if [[ "${STATUS}" == "success" ]]; then
     
    387382# Handle result of signing
    388383if [ ${SUCCESS} -eq 1 ]; then
     384        # Retrieve signed and notarized package
     385        svn up ${SIGNED_REPO_COPY}/${COMPRESSED_PKG}
     386
    389387        # Transfer signed package to ISSM Web site
    390388        echo "Transferring signed package to ISSM Web site"
  • issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python.sh

    r25875 r25879  
    44# To be used after running,
    55#
    6 #       ${ISSM_DIR}/jenkins/jenkins.sh ${ISSM_DIR}/jenkins/pine_island-mac-binaries-matlab
     6#       ${ISSM_DIR}/jenkins/jenkins.sh ${ISSM_DIR}/jenkins/pine_island-mac-binaries-python
    77#
    88# in the context of a Jenkins project.
     
    3030#       Jenkins server. Debugging may be perfomed locally by running,
    3131#
    32 #               packagers/mac/sign-issm-mac-binaries-matlab.sh
     32#               packagers/mac/sign-issm-mac-binaries-python.sh
    3333#
    3434#       with Apple Developer credentials.
     
    104104                --password ${PASSWORD} \
    105105                ${SIGNED_REPO_URL} \
    106                 ${SIGNED_REPO_COPY}
     106                ${SIGNED_REPO_COPY} > /dev/null 2>&1
    107107}
    108108checkout_unsigned_repo_copy(){
     
    114114                --password ${PASSWORD} \
    115115                ${UNSIGNED_REPO_URL} \
    116                 ${UNSIGNED_REPO_COPY}
     116                ${UNSIGNED_REPO_COPY} > /dev/null 2>&1
    117117}
    118118validate_signed_repo_copy(){
     
    329329                --message "ADD: New lock file" ${SIGNED_REPO_COPY}
    330330
    331         # Save current working copy revision number
    332         svn up ${SIGNED_REPO_COPY}
    333         CURRENT_REV=$(svn info --show-item last-changed-revision ${SIGNED_REPO_COPY})
    334 
    335         # Check out copy of SVN repository for unsigned packages
     331        # Check out copy of repository for unsigned packages
    336332        checkout_unsigned_repo_copy
    337333
     
    376372                sleep ${SIGNING_CHECK_PERIOD}
    377373                svn up ${SIGNED_REPO_COPY}
    378                 NEW_REV=$(svn info --show-item last-changed-revision ${SIGNED_REPO_COPY})
    379 
    380                 if [ ${NEW_REV} -ne ${CURRENT_REV} ]; then
     374
     375                if [ ! -f ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} ]; then
    381376                        IN_PROCESS=0
    382377
     378                        # Retrieve notarization lock file
    383379                        svn up ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE}
    384                         svn up ${SIGNED_REPO_COPY}/${COMPRESSED_PKG}
    385 
    386                         # No error, so check status
     380
     381                        # Check status
    387382                        STATUS=$(grep 'Status:' ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} | sed -e 's/[[:space:]]*Status: //')
    388383                        if [[ "${STATUS}" == "success" ]]; then
    389384                                echo "Notarization successful!"
    390                                
     385
    391386                                # Set flag indicating notarization was successful
    392387                                SUCCESS=1
     
    410405# Handle result of signing
    411406if [ ${SUCCESS} -eq 1 ]; then
     407        # Retrieve signed and notarized package
     408        svn up ${SIGNED_REPO_COPY}/${COMPRESSED_PKG}
     409
    412410        # Transfer signed package to ISSM Web site
    413411        echo "Transferring signed package to ISSM Web site"
Note: See TracChangeset for help on using the changeset viewer.