Changeset 25893
- Timestamp:
- 12/18/20 13:07:44 (4 years ago)
- Location:
- issm/trunk-jpl/packagers/mac
- Files:
-
- 1 added
- 1 deleted
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/packagers/mac/commit_for_signing-issm-mac-binaries-python.sh
r25890 r25893 2 2 3 3 ################################################################################ 4 # Commits ISSM distributable package for macOS with MATLABAPI to repository4 # Commits ISSM distributable package for macOS with Python API to repository 5 5 # for signing. This repository is polled by a project running on a JPL 6 6 # Cybersecurity Jenkins server and performs the actual signing and … … 24 24 # 25 25 # See also: 26 # - packagers/mac/complete-issm-mac-binaries- matlab.sh27 # - packagers/mac/sign-issm-mac-binaries- matlab.sh26 # - packagers/mac/complete-issm-mac-binaries-python.sh 27 # - packagers/mac/sign-issm-mac-binaries-python.sh 28 28 ################################################################################ 29 29 … … 61 61 SIGNING_LOCK_FILE="signing.lock" 62 62 UNSIGNED_REPO_COPY="./unsigned" 63 UNSIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/ matlab/unsigned"63 UNSIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/python/unsigned" 64 64 65 65 ## Functions -
issm/trunk-jpl/packagers/mac/complete-issm-mac-binaries-matlab.sh
r25891 r25893 112 112 # Transfer distributable package to ISSM Web site 113 113 if [ ${transfer} -eq 1 ]; then 114 ./packagers/mac/transfer-issm-mac-binaries -matlab.sh114 ./packagers/mac/transfer-issm-mac-binaries.sh 115 115 fi 116 116 -
issm/trunk-jpl/packagers/mac/complete-issm-mac-binaries-python.sh
r25891 r25893 3 3 ################################################################################ 4 4 # Wrapper script to build, package, send for signing, and transfer to ISSM Web 5 # site ISSM distributable package for macOS with MATLABAPI.5 # site ISSM distributable package for macOS with Python API. 6 6 # 7 7 # Normally, we would put this directly into the project configuration under … … 34 34 # Jenkins server. Debugging may be perfomed locally by running, 35 35 # 36 # packagers/mac/sign-issm-mac-binaries- matlab.sh36 # packagers/mac/sign-issm-mac-binaries-python.sh 37 37 # 38 38 # with "ISSM_BINARIES_USER" and "ISSM_BINARIES_PASS" hardcoded to Apple … … 55 55 ## Constants 56 56 # 57 PKG="ISSM-macOS- MATLAB" # Name of directory to copy distributable files to57 PKG="ISSM-macOS-Python" # Name of directory to copy distributable files to 58 58 SIGNED_REPO_COPY="./signed" 59 SIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/ matlab/signed"59 SIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/python/signed" 60 60 61 61 COMPRESSED_PKG="${PKG}.zip" … … 96 96 # Build 97 97 if [ ${build} -eq 1 ]; then 98 ./jenkins/jenkins.sh ./jenkins/pine_island-mac-binaries- matlab98 ./jenkins/jenkins.sh ./jenkins/pine_island-mac-binaries-python 99 99 fi 100 100 101 101 # Package 102 102 if [ ${package} -eq 1 ]; then 103 ./packagers/mac/package-issm-mac-binaries- matlab.sh $1103 ./packagers/mac/package-issm-mac-binaries-python.sh $1 104 104 shift # Clear $1 so that it is not passed to commit_for_signing script 105 105 fi … … 107 107 # Commit for signing 108 108 if [ ${sign} -eq 1 ]; then 109 ./packagers/mac/commit_for_signing-issm-mac-binaries- matlab.sh $1109 ./packagers/mac/commit_for_signing-issm-mac-binaries-python.sh $1 110 110 fi 111 111 112 112 # Transfer distributable package to ISSM Web site 113 113 if [ ${transfer} -eq 1 ]; then 114 ./packagers/mac/transfer-issm-mac-binaries -matlab.sh114 ./packagers/mac/transfer-issm-mac-binaries.sh 115 115 fi 116 116 -
issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-python.sh
r25879 r25893 2 2 3 3 ################################################################################ 4 # To be used after running, 5 # 6 # ${ISSM_DIR}/jenkins/jenkins.sh ${ISSM_DIR}/jenkins/pine_island-mac-binaries-python 7 # 8 # in the context of a Jenkins project. 9 # 10 # When no runtime errors occur, performs the following: 11 # - Checks resulting executables and libraries against test suite. 12 # - Packages and compresses executables and libraries. 13 # - Commits compressed package to repository to be signed by JPL Cybersecurity. 14 # - Retrieves signed package and transmits it to ISSM Web site for 15 # distribution. 4 # Packages and tests ISSM distributable package for macOS with Python API. 16 5 # 17 6 # Options: 18 # -n/--notarizeonly Sign/notarize only (use if signing/notarization fails 19 # to skip tests/packaging) 20 # -s/--skiptests Skip tests (use if this script fails for some reason 21 # after tests have successfully passed to save time) 22 # -t/--transferonly Transfer package to ISSM Web site only (use if 23 # transfer fails for some reason to skip testing and 24 # signing) 25 # -u/--unlock Remove lock file from signed package repository (use if 26 # build is aborted to allow for subsequent fresh build) 27 # 28 # Debugging: 29 # - Relies on a very tight handshake with project on remote JPL Cybersecurity 30 # Jenkins server. Debugging may be perfomed locally by running, 31 # 32 # packagers/mac/sign-issm-mac-binaries-python.sh 33 # 34 # with Apple Developer credentials. 35 # - Removing stdout/stderr redirections to null device (> /dev/null 2>&1) can 36 # help debug potential SVN issues. 7 # -s/--skiptests Skip tests and package only. 37 8 # 38 9 # NOTE: 39 # - Assumes that "ISSM_BINARIES_USER" and "ISSM_BINARIES_PASS" are set up in 40 # the 'Bindings' section under a 'Username and password (separated)' binding 41 # (requires 'Credentials Binding Plugin'). 42 # - For local debugging, the aformentioned credentials can be hardcoded into 43 # the 'USERNAME' and 'PASSWORD' constants below. 10 # - Assumes that the following constants are defined, 11 # 12 # COMPRESSED_PKG 13 # ISSM_DIR 14 # PKG 15 # 16 # See also: 17 # - packagers/mac/complete-issm-mac-binaries-python.sh 18 # - packagers/mac/sign-issm-mac-binaries-python.sh 44 19 ################################################################################ 45 20 … … 70 45 ## Constants 71 46 # 72 NOTARIZATION_LOGFILE="notarization.log"73 PASSWORD=${ISSM_BINARIES_PASS}74 PKG="ISSM-macOS-Python" # Name of directory to copy distributable files to75 47 PYTHON_NROPTIONS="--benchmark all --exclude 125 126 234 235 418 420 435 444 445 701 702 703 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1201 1202 1203 1204 1205 1206 1207 1208 1301 1302 1303 1304 1401 1402 1601 1602 2006 2020 2021 2051 2052 2053 3001:3200 3201 3202 3300 3480 3481 4001 4002 4003" # NOTE: Combination of test suites from basic, Dakota, and Solid Earth builds, with tests that require a restart and those that require the JVM excluded 76 RETRIGGER_SIGNING_FILE="retrigger.txt"77 SIGNED_REPO_COPY="./signed"78 SIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/python/signed"79 SIGNING_CHECK_PERIOD=60 # in seconds80 SIGNING_LOCK_FILE="signing.lock"81 UNSIGNED_REPO_COPY="./unsigned"82 UNSIGNED_REPO_URL="https://issm.ess.uci.edu/svn/issm-binaries/mac/python/unsigned"83 USERNAME=${ISSM_BINARIES_USER}84 85 COMPRESSED_PKG="${PKG}.zip"86 48 87 49 ## Environment … … 133 95 fi 134 96 135 notarize_only=0136 97 skip_tests=0 137 transfer_only=0 138 unlock=0 139 while [ $# -gt 0 ]; do 140 case $1 in 141 -n|--notarizeonly) notarize_only=1; shift ;; 142 -s|--skiptests) skip_tests=1; shift ;; 143 -t|--transferonly) transfer_only=1; shift ;; 144 -u|--unlock) unlock=1; shift ;; 145 *) echo "Unknown parameter passed: $1"; exit 1 ;; 146 esac 147 shift 148 done 149 150 if [ ${unlock} -eq 1 ]; then 151 # Remove signing lock file from signed package repository so that a new 152 # build can run 153 echo "Removing lock file from repository for signed packages" 154 checkout_signed_repo_copy 155 svn up ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 156 svn delete ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 157 svn commit \ 158 --trust-server-cert \ 159 --non-interactive \ 160 --username ${USERNAME} \ 161 --password ${PASSWORD} \ 162 --message "DEL: Removing lock file after failed build" ${SIGNED_REPO_COPY} 163 svn cleanup ${SIGNED_REPO_COPY} 164 exit 1 165 fi 166 167 if [ ${transfer_only} -eq 0 ]; then 168 rm -rf ${SIGNED_REPO_COPY} 169 170 checkout_signed_repo_copy 171 172 # If lock file exists, a signing build is still in process by JPL Cybersecurity 173 svn up ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 174 if [ -f ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} ]; then 175 echo "Previous signing job still in process by JPL Cybersecurity. Please try again later." 98 99 if [ $# -eq 1 ]; then 100 case $1 in 101 -s|--skiptests) skip_tests=1; ;; 102 *) echo "Unknown parameter passed: $1"; exit 1 ;; 103 esac 104 fi 105 106 # Add required binaries and libraries to package and modify them where needed 107 cd ${ISSM_DIR}/bin 108 109 echo "Modify generic" 110 cat generic_static.py | sed -e "s/generic_static/generic/g" > generic.py 111 112 echo "Moving MPICH binaries to bin/" 113 if [ -f ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec ]; then 114 cp ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec . 115 cp ${ISSM_DIR}/externalpackages/petsc/install/bin/hydra_pmi_proxy . 116 elif [ -f ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec ]; then 117 cp ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec . 118 cp ${ISSM_DIR}/externalpackages/mpich/install/bin/hydra_pmi_proxy . 119 else 120 echo "MPICH not found" 121 exit 1 122 fi 123 124 echo "Moving GDAL binaries to bin/" 125 if [ -f ${ISSM_DIR}/externalpackages/gdal/install/bin/gdal-config ]; then 126 cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdalsrsinfo . 127 cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdaltransform . 128 else 129 echo "GDAL not found" 130 exit 1 131 fi 132 133 echo "Moving GMT binaries to bin/" 134 if [ -f ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt-config ]; then 135 cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt . 136 cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmtselect . 137 else 138 echo "GMT not found" 139 exit 1 140 fi 141 142 echo "Moving Gmsh binaries to bin/" 143 if [ -f ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh ]; then 144 cp ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh . 145 else 146 echo "Gmsh not found" 147 exit 1 148 fi 149 150 # Run tests 151 if [ ${skip_tests} -eq 0 ]; then 152 echo "Running tests" 153 cd ${ISSM_DIR}/test/NightlyRun 154 rm python.log 2> /dev/null 155 156 # Set Python environment 157 export PYTHONPATH="${ISSM_DIR}/src/m/dev" 158 export PYTHONSTARTUP="${PYTHONPATH}/devpath.py" 159 export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured 160 161 # Run tests, redirecting output to logfile and suppressing output to console 162 ./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&1 163 164 # Check that Python did not exit in error 165 pythonExitCode=`echo $?` 166 pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python.log | wc -l` 167 168 if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then 169 echo "----------Python exited in error!----------" 170 cat python.log 171 echo "-----------End of python.log-----------" 172 173 # Clean up execution directory 174 rm -rf ${ISSM_DIR}/execution/* 175 176 176 exit 1 177 177 fi 178 178 179 if [ ${notarize_only} -eq 0 ]; then 180 # Clean up from previous packaging 181 echo "Cleaning up existing assets" 182 cd ${ISSM_DIR} 183 rm -rf ${PKG} ${COMPRESSED_PKG} ${UNSIGNED_REPO_COPY} 184 mkdir ${PKG} 185 186 # Check out copy of SVN repository for signed packages 187 # 188 # NOTE: Get empty copy because we do not want to have to check out package 189 # from previous signing. 190 # 191 echo "Checking out copy of repository for signed packages" 192 svn checkout \ 193 --trust-server-cert \ 194 --non-interactive \ 195 --username ${USERNAME} \ 196 --password ${PASSWORD} \ 197 --depth empty \ 198 ${SIGNED_REPO_URL} \ 199 ${SIGNED_REPO_COPY} 200 201 # If lock file exists, a signing build is still in process by JPL Cybersecurity 202 svn up ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 203 if [ -f ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} ]; then 204 echo "Previous signing job still in process by JPL Cybersecurity. Please try again later." 205 exit 1 206 fi 207 208 # Add required binaries and libraries to package and modify them where needed 209 cd ${ISSM_DIR}/bin 210 211 echo "Modify generic" 212 cat generic_static.py | sed -e "s/generic_static/generic/g" > generic.py 213 214 echo "Moving MPICH binaries to bin/" 215 if [ -f ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec ]; then 216 cp ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec . 217 cp ${ISSM_DIR}/externalpackages/petsc/install/bin/hydra_pmi_proxy . 218 elif [ -f ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec ]; then 219 cp ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec . 220 cp ${ISSM_DIR}/externalpackages/mpich/install/bin/hydra_pmi_proxy . 221 else 222 echo "MPICH not found" 223 exit 1 224 fi 225 226 echo "Moving GDAL binaries to bin/" 227 if [ -f ${ISSM_DIR}/externalpackages/gdal/install/bin/gdal-config ]; then 228 cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdalsrsinfo . 229 cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdaltransform . 230 else 231 echo "GDAL not found" 232 exit 1 233 fi 234 235 echo "Moving GMT binaries to bin/" 236 if [ -f ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt-config ]; then 237 cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt . 238 cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmtselect . 239 else 240 echo "GMT not found" 241 exit 1 242 fi 243 244 echo "Moving Gmsh binaries to bin/" 245 if [ -f ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh ]; then 246 cp ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh . 247 else 248 echo "Gmsh not found" 249 exit 1 250 fi 251 252 # Run tests 253 if [ ${skip_tests} -eq 0 ]; then 254 echo "Running tests" 255 256 cd ${ISSM_DIR}/test/NightlyRun 257 rm python.log 2> /dev/null 258 259 # Set Python environment 260 export PYTHONPATH="${ISSM_DIR}/src/m/dev" 261 export PYTHONSTARTUP="${PYTHONPATH}/devpath.py" 262 export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured 263 264 # Run tests, redirecting output to logfile and suppressing output to console 265 ./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&1 266 267 # Check that Python did not exit in error 268 pythonExitCode=`echo $?` 269 pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python.log | wc -l` 270 271 if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then 272 echo "----------Python exited in error!----------" 273 cat python.log 274 echo "-----------End of python.log-----------" 275 276 # Clean up execution directory 277 rm -rf ${ISSM_DIR}/execution/* 278 279 exit 1 280 fi 281 282 # Check that all tests passed 283 numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"` 284 285 if [ ${numTestsFailed} -ne 0 ]; then 286 echo "One or more tests FAILED" 287 exit 1 288 else 289 echo "All tests PASSED" 290 fi 291 else 292 echo "Skipping tests" 293 fi 294 295 # Create package 296 cd ${ISSM_DIR} 297 svn cleanup --remove-ignored --remove-unversioned test # Clean up test directory (before copying to package) 298 echo "Copying assets to package: ${PKG}" 299 cp -rf bin examples lib scripts test ${PKG}/ 300 mkdir ${PKG}/execution 301 cp packagers/mac/issm-executable_entitlements.plist ${PKG}/bin/entitlements.plist 302 ${ISSM_DIR}/scripts/py_to_pyc.sh ${PKG}/bin # Compile Python source files 303 echo "Cleaning up unneeded/unwanted files" 304 rm -f ${PKG}/bin/*.py # Remove all Python scripts 305 rm -f ${PKG}/bin/generic_static.* # Remove static versions of generic cluster classes 306 rm -f ${PKG}/lib/*.a # Remove static libraries from package 307 rm -f ${PKG}/lib/*.la # Remove libtool libraries from package 308 rm -rf ${PKG}/test/SandBox # Remove testing sandbox from package 309 310 # Compress package 311 echo "Compressing package" 312 ditto -ck --sequesterRsrc --keepParent ${PKG} ${COMPRESSED_PKG} 179 # Check that all tests passed 180 numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"` 181 182 if [ ${numTestsFailed} -ne 0 ]; then 183 echo "One or more tests FAILED" 184 exit 1 313 185 else 314 # Assume that previous build was successful, but signing/notarization 315 # failed. 316 # 317 echo "Notarizing only" 186 echo "All tests PASSED" 318 187 fi 319 320 # Commit lock file to repository for signed packages 321 echo "Committing lock file to repository for signed packages" 322 touch ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 323 svn add ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} 324 svn commit \ 325 --trust-server-cert \ 326 --non-interactive \ 327 --username ${USERNAME} \ 328 --password ${PASSWORD} \ 329 --message "ADD: New lock file" ${SIGNED_REPO_COPY} 330 331 # Check out copy of repository for unsigned packages 332 checkout_unsigned_repo_copy 333 334 if [ ${notarize_only} -eq 0 ]; then 335 # Commit new compressed package to repository for unsigned binaries 336 # 337 # NOTE: This will not work if, for any reason, the checksum on the compressed 338 # package is unchanged. 339 # 340 echo "Committing package to repository for unsigned packages" 341 cp ${COMPRESSED_PKG} ${UNSIGNED_REPO_COPY} 342 svn add ${UNSIGNED_REPO_COPY}/${COMPRESSED_PKG} 343 svn commit \ 344 --trust-server-cert \ 345 --non-interactive \ 346 --username ${USERNAME} \ 347 --password ${PASSWORD} \ 348 --message "CHG: New unsigned package" ${UNSIGNED_REPO_COPY} 349 else 350 # NOTE: If notarize_only == 1, we commit a dummy file as the signing 351 # build on the remote JPL Cybersecurity Jenkins server is 352 # triggered by polling SCM. 353 # 354 echo "Attempting to sign existing package again" 355 echo $(date +'%Y-%m-%d-%H-%M-%S') > ${UNSIGNED_REPO_COPY}/${RETRIGGER_SIGNING_FILE} # Write datetime stamp to file to ensure modification is made 356 svn add ${UNSIGNED_REPO_COPY}/${RETRIGGER_SIGNING_FILE} 357 svn commit \ 358 --trust-server-cert \ 359 --non-interactive \ 360 --username ${USERNAME} \ 361 --password ${PASSWORD} \ 362 --message "ADD: Retriggering signing with same package (previous attempt failed)" ${UNSIGNED_REPO_COPY} 363 fi 364 365 # Check status of signing 366 echo "Checking progress of signing..." 367 IN_PROCESS=1 368 SUCCESS=0 369 370 while [ ${IN_PROCESS} -eq 1 ]; do 371 echo "...in progress still; checking again in ${SIGNING_CHECK_PERIOD} seconds" 372 sleep ${SIGNING_CHECK_PERIOD} 373 svn up ${SIGNED_REPO_COPY} 374 375 if [ ! -f ${SIGNED_REPO_COPY}/${SIGNING_LOCK_FILE} ]; then 376 IN_PROCESS=0 377 378 # Retrieve notarization lock file 379 svn up ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} 380 381 # Check status 382 STATUS=$(grep 'Status:' ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} | sed -e 's/[[:space:]]*Status: //') 383 if [[ "${STATUS}" == "success" ]]; then 384 echo "Notarization successful!" 385 386 # Set flag indicating notarization was successful 387 SUCCESS=1 388 else 389 echo "Notarization failed!" 390 fi 391 fi 392 done 393 else 394 # Assume that previous build resulted in successful signing of package but 395 # that transfer to ISSM Web site failed and user built this project again 396 # with -t/--transferonly option. 397 # 398 399 # Make sure copy of repository for signed packages exists 400 validate_signed_repo_copy 401 402 SUCCESS=1 403 fi 404 405 # Handle result of signing 406 if [ ${SUCCESS} -eq 1 ]; then 407 # Retrieve signed and notarized package 408 svn up ${SIGNED_REPO_COPY}/${COMPRESSED_PKG} 409 410 # Transfer signed package to ISSM Web site 411 echo "Transferring signed package to ISSM Web site" 412 scp -i ~/.ssh/pine_island_to_ross ${SIGNED_REPO_COPY}/${COMPRESSED_PKG} jenkins@ross.ics.uci.edu:/var/www/html/${COMPRESSED_PKG} 413 414 if [ $? -ne 0 ]; then 415 echo "Transfer failed! Verify connection then build this project again (with -t/--transferonly option to skip testing and signing)." 416 exit 1 417 fi 418 else 419 echo "----------------------- Contents of notarization logfile -----------------------" 420 cat ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} 421 echo "--------------------------------------------------------------------------------" 422 423 exit 1 424 fi 188 else 189 echo "Skipping tests" 190 fi 191 192 # Create package 193 cd ${ISSM_DIR} 194 svn cleanup --remove-ignored --remove-unversioned test # Clean up test directory (before copying to package) 195 echo "Copying assets to package: ${PKG}" 196 cp -rf bin examples lib scripts test ${PKG}/ 197 mkdir ${PKG}/execution 198 cp packagers/mac/issm-executable_entitlements.plist ${PKG}/bin/entitlements.plist 199 ${ISSM_DIR}/scripts/py_to_pyc.sh ${PKG}/bin # Compile Python source files 200 echo "Cleaning up unneeded/unwanted files" 201 rm -f ${PKG}/bin/*.py # Remove all Python scripts 202 rm -f ${PKG}/bin/generic_static.* # Remove static versions of generic cluster classes 203 rm -f ${PKG}/lib/*.a # Remove static libraries from package 204 rm -f ${PKG}/lib/*.la # Remove libtool libraries from package 205 rm -rf ${PKG}/test/SandBox # Remove testing sandbox from package 206 207 # Compress package 208 echo "Compressing package" 209 ditto -ck --sequesterRsrc --keepParent ${PKG} ${COMPRESSED_PKG}
Note:
See TracChangeset
for help on using the changeset viewer.