Commits

Ville Suoranta authored e18782270ac
Add Python version as an option
No tags

casalith/macbuildcasalith-bigsur.sh

Deleted
1 -#!/usr/bin/env bash
2 -# This is a simple utility to make Bamboo builds of casalith easier
3 -# This should be run in the casalith docker container
4 -
5 -# Inputs:
6 -# wheeldirectory
7 -# branch
8 -wheeldirectory=$1
9 -branch=$2
10 -casalithbranch=$3
11 -signature=$4
12 -OS=`uname`
13 -
14 -echo "wheeldirectory: $wheeldirectory"
15 -echo "branch: $branch"
16 -echo "casalithbranch: $casalithbranch"
17 -echo "OS: $OS"
18 -
19 -# export PATH=/usr/lib64/ccache:/opt/rh/rh-python36/root/usr/bin:/opt/rh/devtoolset-4/root/usr/bin:/opt/casa/03/bin:/opt/casa/02/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/casa/02/bin
20 -
21 -toolswheel=$wheeldirectory/`ls $wheeldirectory | grep casatools`
22 -taskswheel=$wheeldirectory/`ls $wheeldirectory | grep casatasks`
23 -shellwheel=$wheeldirectory/`ls $wheeldirectory | grep casashell`
24 -testutilswheel=$wheeldirectory/`ls $wheeldirectory | grep casatestutils`
25 -
26 -echo "Tools: $toolswheel"
27 -echo "Tasks: $taskswheel"
28 -echo "Shell: $shellwheel"
29 -echo "Casatestutils: $testutilswheel"
30 -
31 -echo Working directory: `pwd`
32 -
33 -git clone --recursive https://open-bitbucket.nrao.edu/scm/casa/casalith.git
34 -cd casalith
35 -git checkout $casalithbranch
36 -rc=$?
37 -if [[ $rc != 0 ]]; then
38 - echo "Failed to checkout casalith branch $casalithbranch. Continuing packaging with casalith master"
39 -fi
40 -git submodule update --recursive
41 -cd ..
42 -
43 -export PYTHONNOUSERSITE=1
44 -python -m venv casalith_venv
45 -source casalith_venv/bin/activate
46 -
47 -if [ "$branch" == "master" ]; then
48 - cd casalith/build-casalith && ./generate-distro tools=$toolswheel tasks=$taskswheel shell=$shellwheel testutils=$testutilswheel clone=https://open-bitbucket.nrao.edu/scm/casa/casa6.git branch=$branch --use-nrao-index
49 - cd -
50 -elif [[ "$branch" =~ ^release.* ]];then
51 - cd casalith/build-casalith && ./generate-distro tools=$toolswheel tasks=$taskswheel shell=$shellwheel testutils=$testutilswheel clone=https://open-bitbucket.nrao.edu/scm/casa/casa6.git branch=$branch --use-nrao-index
52 - cd -
53 -elif [[ "$branch" =~ ^CAS-.* ]];then
54 - revision=`perl getdevpackagerevision.pl shell=$shellwheel`
55 - cd casalith/build-casalith && ./generate-distro tools=$toolswheel tasks=$taskswheel shell=$shellwheel testutils=$testutilswheel clone=https://open-bitbucket.nrao.edu/scm/casa/casa6.git branch=$branch --use-nrao-index
56 - cd -
57 - cd casalith/build-casalith/work/$OS/output
58 - # Rename the working directory
59 - old=$(ls . | grep "casa-*"| tr "/" " ")
60 - mv $old casa-$branch-$revision
61 - cd -
62 -else
63 - revision=`perl getdevpackagerevision.pl shell=$shellwheel`
64 - version=`perl getdevpackageversion.pl shell=$shellwheel`
65 - cd casalith/build-casalith && ./generate-distro tools=$toolswheel tasks=$taskswheel shell=$shellwheel testutils=$testutilswheel clone=https://open-bitbucket.nrao.edu/scm/casa/casa6.git branch=$branch version=$version-$branch-$revision --use-nrao-index
66 - cd -
67 - cd casalith/build-casalith/work/$OS/output
68 - # Rename the working directory
69 - old=$(ls . | grep "casa-*"| tr "/" " ")
70 - mv $old casa-$branch-$revision
71 - cd -
72 -fi
73 -deactivate
74 -rm -rf casalith_venv
75 -perl sign.pl casalith/build-casalith/work/darwin/output/CASA.app $signature
76 -package_id=`perl getmacpackagename.pl shell=$shellwheel`
77 -# Launch Casa once to generate .pyc files
78 -casalith/build-casalith/work/darwin/output/CASA.app/Contents/MacOS/casa -c "exit()"
79 -casalith/build-casalith/work/casa-pkg/packaging/scripts/make-dmg casalith/build-casalith/work/darwin/output/CASA.app $package_id

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut