release 4.18 KB
Newer Older
David Byers's avatar
David Byers committed
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
106
107
108
109
#!/bin/sh

ask ()
{
    if [ "$2" = "yes" -o "$2" = "ja" ] ; then
        yes="X"
        no=""
    else
        yes=""
        no="X"
    fi
    
    ask1=""
    while [ ! "$ask1" ] ; do
        echo $1 "(y/n)? [$2] \c"
        read ans
        case "$ans" in
            [yYjJ]*) yes="X"; no=""; ask1="X" ;;
            [nN]*)   yes=""; no="X"; ask1="X" ;;
            "")      ask1="X";;
            *)       echo "Please enter yes, no or return" ;;
        esac
    done
}

askedit ()
{
    ask "Vill du editera $1" ja
    if [ "$yes" ] ; then
        emacs -nw -q $1
    fi
}


echo "Versionsnummer: \c"
read version
echo "Frbereder release av elispklient version $version"

q1=""
while [ ! "$q1" ] ; do
    ask "r doc/NEWS-$version uppdaterad" nej
    if [ "$no" ] ; then
        askedit doc/NEWS-$version
    else
        q1="X"
    fi
done


q2=""
while [ ! "$q2" ] ; do
    v1=`grep "^CLIENTVERSION" doc/Makefile | \
             sed "s/.*CLIENTVERSION.*=[ \t]*\(.*\)$/\1/"`
    if [ "$v1" = "$version" ] ; then
        echo "Versionsnummer i doc/Makefile r OK ($v1)."
        q2="X"
    else
        echo "Versionsnumret i doc/Makefile r $v1 (borde vara $version)"
        askedit doc/Makefile
    fi
done

q2=""
while [ ! "$q2" ] ; do
    v2=`grep "^CLIENTVERSION" src/Makefile | \
             sed "s/.*CLIENTVERSION.*=[ \t]*\(.*\)$/\1/"`
    if [ "$v2" = "$version" ] ; then
        echo "Versionsnummer i src/Makefile r OK ($v2)."
        q2="X"
    else
        echo "Versionsnumret i src/Makefile r $v2 (borde vara $version)"
        askedit src/Makefile
    fi
done


echo "Kontrollerar strngar  snt..."
if ( cd src; set -x; make check ) ; then
    ask "Gick det bra" ja
else
    ask "Gick det bra" nej
fi
if [ "$no" ] ; then
    echo "D avbryter vi releasen"
    exit 1
fi


echo "Vi frsker kompilera..."
if ( cd src; set -x; make ) ; then
    ask "Gick kompileringen bra" ja
else
    ask "Gick kompileringen bra" nej
fi
if [ "$no" ] ; then
    echo "D avbryter vi releasen"
    exit 1
fi

q1=""
while [ ! "$q1" ] ; do
    ask "Har du skrivit ett ChangeLog-entry fr releasen" nej
    if [ "$no" ] ; then
        askedit src/ChangeLog
    else
        q1="X"
    fi
done

110
111
112
113
114
115
116
revision=""
ask "Vill du gra en numerisk revision fr alla filer" ja
if [ "$yes" ] ; then
    echo "Revision: \c"
    read revision
fi
        
David Byers's avatar
David Byers committed
117
118
tag=`echo v$version | tr "." "-"`

119

David Byers's avatar
David Byers committed
120
if [ "$revision" ] ; then
121
122
123
124
125
    echo "cvs revision blir $revision"
else
    echo "cvs revision blir ofrndrad"
fi

David Byers's avatar
David Byers committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
cat <<EOF
cvs symboliska tag blir $tag

Du str i begrepp att brja checka in, ndra revisioner och tagga 
filer. Nr det vl har kommit igng finns det ingen tervndo. Nr
du gr en release kommer det att bli massor av jobb och gnll och
tjafs, fr att inte tala om buggrapporter som har med allt annat n 
LysKOM att gra (till exempel att externa program inte fungerar som
de ska i Windows NT, eller att Netscape fr fel bakgrundsfrg.)

EOF

ask "Vill du trots det fortfarande gra en release" nej
if [ "$no" ] ; then
    echo "Det var nog lika bra att lta bli..."
    exit 1
fi


echo "Checkar in fr skerhets skull..."
if ( set -x; cvs commit -m "Synkning infr release av $version" ) ; then
    ;
else
David Byers's avatar
David Byers committed
149
    ask "Fortstt trots att incheckningen inte gick bra" nej
David Byers's avatar
David Byers committed
150
151
152
153
154
    if [ "$no" ] ; then
        exit 1
    fi
fi

155
156
157
158
159
if [ "$revision" ] ; then
    echo "Uppdaterar revisionsnumret..."
    if ( set -x; cvs commit -r $version ) ; then
        ;
    else
David Byers's avatar
David Byers committed
160
        ask "Fortstt trots att revisionsndringen inte gick bra" nej
161
162
163
        if [ "$no" ] ; then
            exit 1
        fi
David Byers's avatar
David Byers committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
    fi
fi

echo "Revisionens symboliska tag: [$tag] \c"
reas ans
case $ans in
    "") ;;
    *) tag="$ans" ;;
esac

echo "Stter symbolisk tag..."
if ( set -x ; cvs tag "$tag" ) ; then
    ;
else
David Byers's avatar
David Byers committed
178
    ask "Forststt trots att taggningen inte gick bra" nej
David Byers's avatar
David Byers committed
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
    if [ "$no" ] ; then
        exit 1
    fi
fi

echo "Bygger release i src/"
if ( cr src; set -x; make release) ; then
    echo "Det gick inte att gra release. Ngonting r galet."
    echo "Se till att gra make release manuellt istllet."
fi

cat <<EOF

Fljande saker mste fortfarande gras:

* Installera klienten p Lysator
* Kopiera releasen till ftp.lysator.liu.se (om inte make release gr det.)
* Annonsera i LysKOM
EOF

exit 0