-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake-release
executable file
·106 lines (91 loc) · 2.96 KB
/
make-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/sh
# make-release: Create a new release of the JIGS
#
# Copyright (C) 2000 Free Software Foundation, Inc.
#
# Author: Nicola Pero <[email protected]>
# Date: July 2000
#
# This file is part of GNUstep.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# The following file is obsolete because gnustep-make now provides
# built-in support for exporting .tar.gz from SVN.
#
make svn-snapshot
exit 0
#
# Usage: make-release
# It creates a release.
# The release number is obtained by looking for the line:
#
# #define GNUSTEP_JAVA_VERSION 0.1.0
#
# in the file Source/JIGS.h
#
# By changing the following four, you may use this script
# to generate releases for other packages/cvs modules
#
package_name=jigs
cvs_module=java
# Header file containing the release info
header_file=Source/JIGS.h
# Name of the variable to look for
release_variable=GNUSTEP_JAVA_VERSION
# CVS read access
pserver_read_only=":pserver:[email protected]:/cvsroot/gnustep"
#
# Now the code
#
# Start
echo Making release of ${package_name}
# Create ./releases directory if it does not exist
if [ ! -d releases ]; then
mkdir releases
fi
# Go into ./releases
cd releases
# Export CVS module in ./releases
echo Exporting CVS module ${cvs_module}
cvs -z9 -d$pserver_read_only export -D now $cvs_module
# Get release info
cd ${cvs_module}
release_tmp=`grep define ${header_file} | grep ${release_variable}`
# Remove #define ${release_variable} from the beginning of release_tmp
code_to_remove="#define ${release_variable} "
release=${release_tmp#${code_to_remove}}
# Remove any space in the remaining string
release=`echo ${release} | sed 's/ //g'`
cd ..
# Tell the user what release we are creating
echo Creating release ${release}
release_name=${package_name}-${release}
# Change name of the source directory
mv ${cvs_module} ${release_name}
# Save previous release before writing the new one
if [ -f ${release_name}.tar.gz ]; then
echo "releases/${release_name}.tar.gz already exists:"
echo "saving old version in releases/${release_name}.tar.gz~"
mv ${release_name}.tar.gz ${release_name}.tar.gz~
fi
# Create the .tar.gz
echo Creating the archive file
tar chfz ${release_name}.tar.gz $release_name
rm -rf $release_name
# Done; a tiny check before exit
if [ ! -f ${release_name}.tar.gz ]; then
echo Error creating release !
fi