source: issm/trunk-jpl/packagers/linux/complete-issm-linux-binaries-python-3.sh@ 26988

Last change on this file since 26988 was 26988, checked in by jdquinn, 3 years ago

CHG: Splitting Linux Python binaries into separate builds for versions 2 and 3; typos

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/bash
2
3################################################################################
4# Wrapper script to build, package, and transfer to ISSM Web site ISSM
5# distributable package for Linux with Python 3 API.
6#
7# Normally, we would put this directly into the project configuration under
8# 'Build' -> 'Excute shell', but becasue it is a bit more involved, it is a
9# good idea to version it.
10#
11# When no failures/errors occur, performs the following:
12# - Builds ISSM according to configuration.
13# - Packages executables and libraries.
14# - Runs test suite against package.
15# - Transmits package to ISSM Web site for distribution.
16#
17# Options:
18# -b/--skipbuild Skip ISSM compilation.
19# -s/--skiptests Skip ISSM compilation and testing during packaging
20# step. Use if packaging fails for some reason but build
21# is valid.
22# -t/--transferonly Transfer package to ISSM Web site only. Use if transfer
23# fails for some reason to skip building, packaging, and
24# signing.
25#
26# NOTE:
27# - Use only *one* of the above options at a time, and make sure it is removed
28# again after a single run.
29# - Builds will fail when any of the above options are used on a clean
30# workspace. For example, if 'Source Code Management' -> 'Check-out Strategy'
31# select menu is set to "Always check out a fresh copy".
32################################################################################
33
34## Constants
35#
36PKG="ISSM-Linux-Python-3" # Name of directory to copy distributable files to
37
38COMPRESSED_PKG="${PKG}.tar.gz"
39
40## Environment
41#
42export COMPRESSED_PKG
43export PKG
44
45## Parse options
46#
47if [ $# -gt 1 ]; then
48 echo "Can use only one option at a time"
49 exit 1
50fi
51
52# NOTE: We could do this with binary switching (i.e. 0011 to sign and transfer,
53# but the following is self-documenting).
54#
55build=1
56package=1
57transfer=1
58
59if [ $# -eq 1 ]; then
60 case $1 in
61 -b|--skipbuild) build=0; shift ;;
62 -s|--skiptests) build=0; ;;
63 -t|--transferonly) build=0; package=0; ;;
64 *) echo "Unknown parameter passed: $1"; exit 1 ;;
65 esac
66fi
67
68# Build
69if [ ${build} -eq 1 ]; then
70 ./jenkins/jenkins.sh ./jenkins/ross-debian_linux-binaries-python-3
71
72 if [ $? -ne 0 ]; then
73 exit 1
74 fi
75fi
76
77# Package
78if [ ${package} -eq 1 ]; then
79 ./packagers/linux/package-issm-linux-binaries-python-3.sh $1
80
81 if [ $? -ne 0 ]; then
82 exit 1
83 fi
84fi
85
86# Transfer distributable package to ISSM Web site
87if [ ${transfer} -eq 1 ]; then
88 ./packagers/linux/transfer-issm-linux-binaries.sh
89
90 if [ $? -ne 0 ]; then
91 exit 1
92 fi
93fi
94
Note: See TracBrowser for help on using the repository browser.