source: trunk/bin/package.sh @ 3788

Last change on this file since 3788 was 3788, checked in by bradbell, 4 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: c4559d5e01e1b0f09943490dd84449557eced25d
end hash code: 431e0a227dbfe6172d265d9d79a2b5b258c5bc18

commit 431e0a227dbfe6172d265d9d79a2b5b258c5bc18
Author: Brad Bell <bradbell@…>
Date: Tue Feb 9 07:41:29 2016 -0700

  1. Change package.sh to automatically update version on (master branch only).
  2. Change version.sh copy to check and change.

commit a14455414810cfe3c3e4bca90090defc2528a353
Author: Brad Bell <bradbell@…>
Date: Tue Feb 9 06:19:54 2016 -0700

Change check_verbatim to check_srcfile
because all but one of the verbatim commands were changed to srcfile commands.


check_include_omh.sh: old check that file names did not change case (for cygwin development).

commit 4ce45b796b57629332ab46d8ae6df94e0a1ed998
Author: Brad Bell <bradbell@…>
Date: Tue Feb 9 06:04:57 2016 -0700

batch_edit.sh to change $verbatim and $codep to $srcfile and $srccode.


det_by_minor.c: remove some invisible white space.

commit 56553b88c9623c30d2222425a9640b95ce4c8281
Author: Brad Bell <bradbell@…>
Date: Mon Feb 8 18:01:49 2016 -0700

check_jenkins.sh: jenkins.sh no longer takes an argument.
jenkins.sh: fix name of script in error message.

commit 3b8a208cfc7e8ef3c928c17eb291aa3b90ff0050
Author: Brad Bell <bradbell@…>
Date: Mon Feb 8 07:57:02 2016 -0700

new_release.sh: track branches in comments, back to master at OK end, first check of response.

commit 442b7cbc45c022776e8257d3c3404dccdd06c420
Author: Brad Bell <bradbell@…>
Date: Mon Feb 8 06:01:11 2016 -0700

  1. Advance to release 20160000.1.
  2. Check using master version of new_release.sh.
  3. Make sure auto-tools version up to date.
  4. Ask user if doing further testing before commiting new release.

commit f7bdd1f48e72feb05d604da63914022809f45c28
Author: Brad Bell <bradbell@…>
Date: Sun Feb 7 07:59:41 2016 -0700

Add shared library version number to cppad_lib; i.e., cppad_lib.yyyy.mmdd.rel

commit a4c716552e3ad05b337aea58b643c9ad1cbcd4ac
Author: Brad Bell <bradbell@…>
Date: Sun Feb 7 05:25:39 2016 -0700

Make cppad_lib libarary conditional on colpack_prefix being specified.

commit 5e8890eb8de8b0cde146a6ed59c391d7c355ff24
Author: Brad Bell <bradbell@…>
Date: Tue Jan 26 10:49:37 2016 -0700

vector.hpp: fix The -> This.

commit e4e5442b069d7b00e197c31616da32eee20460b3
Merge: c4559d5 ed28b89
Author: Brad Bell <bradbell@…>
Date: Tue Jan 26 09:47:58 2016 -0700

Merge pull request #14 from barak/master


fix spelling in description of cppad_profile_flag on cmake command line

commit ed28b899c9fedab52a578aa7dd73818638081fe6
Author: Barak A. Pearlmutter <barak+git@…>
Date: Tue Jan 26 16:24:32 2016 +0000

typo

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1#! /bin/bash -e
2# $Id: package.sh 3788 2016-02-09 15:50:06Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13if [ $0 != "bin/package.sh" ]
14then
15        echo "bin/package.sh: must be executed from its parent directory"
16        exit 1
17fi
18echo_log_eval() {
19        echo $*
20        echo $* >> $top_srcdir/package.log
21        if ! eval $* >> $top_srcdir/package.log
22        then
23                echo "Error: check package.log"
24                exit 1
25        fi
26}
27log_eval() {
28        echo $* >> $top_srcdir/package.log
29        if ! eval $* >> $top_srcdir/package.log
30        then
31                echo "Error: check package.log"
32                exit 1
33        fi
34}
35if [ -e package.log ]
36then
37        echo "rm package.log"
38        rm package.log
39fi
40top_srcdir=`pwd`
41# ----------------------------------------------------------------------------
42this_license=`\
43        grep '$verbatim%' omh/license.omh | sed -e 's|$verbatim%\(...\).*|\1|'`
44if [ "$this_license" == 'epl' ]
45then
46        remove_list='gpl-3.0.txt bin/gpl_license.sh'
47elif [ "$this_license" == 'gpl' ]
48then
49        remove_list='epl-v10.txt epl-v10.html bin/gpl_license.sh'
50else
51        echo 'bin/package.sh: cannot find license in omh/license.omh'
52        exit 1
53fi
54# ----------------------------------------------------------------------------
55# Make sure version is set correctly
56#
57# if this is the master, set version to today
58branch=`git branch | grep '^\*' | sed -e 's|^\* *||'`
59if [ "$branch" == 'master' ]
60then
61        bin/version.sh set
62fi
63# make sure that version number is the same in all files
64echo_log_eval bin/version.sh check
65#
66# Get version number and make sure all copies agree
67version=`bin/version.sh get`
68echo_log_eval bin/version.sh get
69# ----------------------------------------------------------------------------
70# Run automated checks for the form bin/check_*.sh with a few exceptions.
71list=`ls bin/check_* | sed \
72        -e '/check_all.sh/d' \
73        -e '/check_jenkins.sh/d' \
74        -e '/check_svn_dist.sh/d'`
75for check in $list
76do
77        echo_log_eval $check
78done
79# ----------------------------------------------------------------------------
80# Check for doxygen errors
81echo_log_eval bin/run_doxygen.sh
82# ----------------------------------------------------------------------------
83# Create the package directory
84package_dir="build/cppad-$version"
85if [ -e "$package_dir" ]
86then
87        echo_log_eval rm -r $package_dir
88fi
89for lic in epl gpl
90do
91        if [ -e "$package_dir.epl.tgz" ]
92        then
93                echo_log_eval rm $package_dir.$lic.tgz
94        fi
95done
96echo_log_eval mkdir -p $package_dir
97# -----------------------------------------------------------------------------
98# Source file that are coppied to the package directory
99file_list=`bin/ls_files.sh`
100#
101# Copy the files, creating sub-directories when necessary
102echo_log_eval echo "copy files to $package_dir"
103for file in $file_list $other_files
104do
105        sub_dir=`echo $file | sed -e 's|\(.*\)/[^/]*$|\1|'`
106        if [ "$sub_dir" != "$file" ]
107        then
108                if [ ! -e "$package_dir/$sub_dir" ]
109                then
110                        log_eval mkdir -p $package_dir/$sub_dir
111                fi
112        fi
113        log_eval cp $file $package_dir/$file
114done
115echo_log_eval echo "remove certain files from $package_dir"
116for file in $remove_list
117do
118        if [ -e $package_dir/$file ]
119        then
120                echo_log_eval rm $package_dir/$file
121        fi
122done
123# ----------------------------------------------------------------------------
124# build the xml version of documentation for this distribution
125echo_log_eval cd $package_dir
126#
127# Only include the *.xml verison of the documentation in distribution
128# So remove the table at the top (but save the original doc.omh file).
129if ! grep < doc.omh > /dev/null \
130        'This comment is used to remove the table below'
131then
132        echo "Missing comment expected in doc.omh"
133        exit 1
134fi
135echo_log_eval echo "sed -i.save doc.omh ..."
136sed -i.save doc.omh \
137        -e '/This comment is used to remove the table below/,/$tend/d'
138#
139# This command creates omhelp.xml.log in current directory (and says so)
140echo_log_eval echo "bin/run_omhelp.sh xml"
141if ! bin/run_omhelp.sh xml
142then
143        echo_log_eval cp omhelp.xml.log $top_srcdir/omhelp.xml.log
144        exit 1
145fi
146# Copy the log to the directory where the package.sh command was executed
147echo_log_eval cp omhelp.xml.log $top_srcdir/omhelp.xml.log
148# Restore the original doc.omh
149echo_log_eval mv doc.omh.save doc.omh
150# ----------------------------------------------------------------------------
151# change back to the package parent directory and create the tarball
152echo_log_eval cd ..
153echo_log_eval tar -czf cppad-$version.$this_license.tgz cppad-$version
154# ----------------------------------------------------------------------------
155# create gpl version of package
156echo_log_eval cd $top_srcdir
157if [ -e 'bin/gpl_license.sh' ]
158then
159        if [ "$this_license" != 'epl' ]
160        then
161                echo 'package.sh: bin/gpl_license.sh found in gpl verison of source.'
162                exit 1
163        fi
164        echo_log_eval bin/gpl_license.sh cppad-$version build build
165fi
166# ----------------------------------------------------------------------------
167echo "$0: OK"
168exit 0
Note: See TracBrowser for help on using the repository browser.