summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-09-03 09:44:52 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2019-09-03 09:46:16 +0200
commitb8555a57e8527701e66bb6b454492444fa57ebae (patch)
tree24eb785143f7a16bfc77d724ced6715f345b6f71
parent919c030ae047755d0b6109dca548f789ce24fbbf (diff)
release: update release script for meson buildsystem
In preparations for the 1.23 release this needs updating for our switch from autotools to meson. Cleaning up some no longer needed separated libs handling.
-rwxr-xr-xrelease.sh126
1 files changed, 47 insertions, 79 deletions
diff --git a/release.sh b/release.sh
index 86b945c..f702af5 100755
--- a/release.sh
+++ b/release.sh
@@ -2,15 +2,14 @@
2 2
3### CONFIG - Please edit this section before using this script 3### CONFIG - Please edit this section before using this script
4VERSION_MAJ=1 4VERSION_MAJ=1
5VERSION_MIN=22 5VERSION_MIN=23
6OLD_VERSION_MIN=21 6OLD_VERSION_MIN=22
7VERSION_MIC=0 7VERSION_MIC=0
8OLD_VERSION_MIC=0 8OLD_VERSION_MIC=0
9PRE_RELEASE_STRING="-alpha1" # "", "-alpha1", "-beta1", ... 9PRE_RELEASE_STRING="-alpha1" # "", "-alpha1", "-beta1", ...
10OLD_PRE_RELEASE_STRING="" 10OLD_PRE_RELEASE_STRING=""
11 11
12#OLD_VERSION_MIC=$(let $VERSION_MIC-1) 12#OLD_VERSION_MIC=$(let $VERSION_MIC-1)
13libs="efl"
14VERSION_SIMPLE="$VERSION_MAJ.$VERSION_MIN.$VERSION_MIC" 13VERSION_SIMPLE="$VERSION_MAJ.$VERSION_MIN.$VERSION_MIC"
15VERSION="$VERSION_SIMPLE$PRE_RELEASE_STRING" 14VERSION="$VERSION_SIMPLE$PRE_RELEASE_STRING"
16OLD_VERSION="$VERSION_MAJ.$OLD_VERSION_MIN.$OLD_VERSION_MIC$OLD_PRE_RELEASE_STRING" 15OLD_VERSION="$VERSION_MAJ.$OLD_VERSION_MIN.$OLD_VERSION_MIC$OLD_PRE_RELEASE_STRING"
@@ -25,109 +24,92 @@ set -e
25 24
26get_news() 25get_news()
27{ 26{
28 $EDITOR configure.ac || exit 1 27 $EDITOR meson.build || exit 1
29 echo "Changes since $OLD_VERSION:" >> NEWS 28 echo "Changes since $OLD_VERSION:" >> NEWS
30 echo -e "---------------------\n" >> NEWS 29 echo -e "---------------------\n" >> NEWS
31 ../release-management/generate_news.py v$OLD_VERSION..HEAD >> NEWS || exit 1 30 ../release-management/generate_news.py v$OLD_VERSION..HEAD >> NEWS || exit 1
32 git diff || exit 1 31 git diff || exit 1
33 $EDITOR NEWS || exit 1 32 $EDITOR NEWS || exit 1
34 git diff || exit 1 33 git diff || exit 1
35 git commit -v configure.ac NEWS -m "release: Update NEWS and bump version for $VERSION release" || exit 1 34 git commit -v meson.build NEWS -m "release: Update NEWS and bump version for $VERSION release" || exit 1
36 git show || exit 1 35 git show || exit 1
37} 36}
38 37
39do_compile() 38do_compile()
40{ 39{
41 ./autogen.sh || exit 1 40 meson build-efl-$VERSION
42 make "$MAKEFLAGS" || exit 1 41 ninja -C build-efl-$VERSION dist
43 make -j 3 distcheck || exit 1
44 42
45 make doc 43# make doc
46} 44}
47 45
48do_package_and_upload() 46do_package_and_upload()
49{ 47{
50 local lib flags
51
52 lib="$1"
53 echo 48 echo
54 echo "Package $lib" 49 echo "Package efl"
55 echo 50 echo
56 51
57 cd "$lib" 52 cd efl
58 #git co po/ || exit 1
59 make clean distclean || exit 1
60 53
61 get_news 54 get_news
62 do_compile 55 do_compile
63 56
64 sha256sum $lib-$VERSION.tar.xz > $lib-$VERSION.tar.xz.sha256 57 build-efl-$VERSION/meson-dist/efl-1.23.0.tar.xz
58 build-efl-$VERSION/meson-dist/efl-1.23.0.tar.xz.sha256sum
65 59
66 if [ $MAJOR = 0 ]
67 then
68 mv $lib-$VERSION.tar.xz $lib-$VERSION-pre.tar.xz
69 mv $lib-$VERSION.tar.xz.sha256 $lib-$VERSION-pre.tar.xz.sha256
70 fi
71 60
72 if [ $MAJOR = 0 ] 61 if [ $MAJOR = 0 ]
73 then 62 then
74 scp $lib-$VERSION-pre.tar.* download.enlightenment.org:/srv/web/download.enlightenment.org/public_html/pre-releases/ 63 mv efl-$VERSION.tar.xz efl-$VERSION-pre.tar.xz
64 mv efl-$VERSION.tar.xz.sha256 efl-$VERSION-pre.tar.xz.sha256
65 scp efl-$VERSION-pre.tar.* download.enlightenment.org:/srv/web/download.enlightenment.org/pre-releases/
75 fi 66 fi
76 67
77 scp $lib-$VERSION.tar.* download.enlightenment.org:/srv/web/download.enlightenment.org/public_html/pre-releases/ 68 scp efl-$VERSION.tar.* download.enlightenment.org:/srv/web/download.enlightenment.org/pre-releases/
78 69
79 cd .. 70 cd ..
80 echo 71 echo
81 echo "Packaged and uploaded $lib. Please push changes to repo now." 72 echo "Packaged and uploaded efl. Please push changes to repo now."
82 echo 73 echo
83} 74}
84 75
85do_finalize_release() 76do_finalize_release()
86{ 77{
87 local lib flags
88
89 lib="$1"
90 echo 78 echo
91 echo "Finalize $lib" 79 echo "Finalize efl"
92 echo 80 echo
93 81
94 cd "$lib" 82 cd efl
95 git tag -a v$VERSION -m "v$VERSION" || exit 1 83 git tag -a v$VERSION -m "v$VERSION" || exit 1
96 84
97# if [ $MAJOR = 1 ] 85# if [ $MAJOR = 1 ]
98# then 86# then
99# git branch $lib-$VERSION_MAJ.$VERSION_MIN 87# git branch efl-$VERSION_MAJ.$VERSION_MIN
100# git push origin $lib-$VERSION_MAJ.$VERSION_MIN:$lib-$VERSION_MAJ.$VERSION_MIN 88# git push origin efl-$VERSION_MAJ.$VERSION_MIN:efl-$VERSION_MAJ.$VERSION_MIN
101# fi 89# fi
102 90
103 echo "Move tarballs to final destination" 91 echo "Move tarballs to final destination"
104 if [ $MAJOR = 0 ] 92 if [ $MAJOR = 0 ]
105 then 93 then
106 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/public_html/pre-releases/$lib-$VERSION-pre.tar.xz /srv/web/download.enlightenment.org/public_html/rel/libs/$lib/$lib-$VERSION.tar.xz 94 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/pre-releases/efl-$VERSION-pre.tar.xz /srv/web/download.enlightenment.org/rel/libs/efl/efl-$VERSION.tar.xz
107 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/public_html/pre-releases/$lib-$VERSION-pre.tar.xz.sha256 /srv/web/download.enlightenment.org/public_html/rel/libs/$lib/$lib-$VERSION.tar.xz.sha256 95 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/pre-releases/efl-$VERSION-pre.tar.xz.sha256 /srv/web/download.enlightenment.org/rel/libs/efl/efl-$VERSION.tar.xz.sha256
108 else 96 else
109 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/public_html/pre-releases/$lib-$VERSION.tar.* /srv/web/download.enlightenment.org/public_html/rel/libs/$lib/ 97 ssh download.enlightenment.org mv /srv/web/download.enlightenment.org/pre-releases/efl-$VERSION.tar.* /srv/web/download.enlightenment.org/rel/libs/efl/
110 98
111 # only efl and elementary 99 scp efl-$VERSION-doc.tar.bz2 download.enlightenment.org:/srv/web/docs.enlightenment.org/public_html/efl/
112 if [ $lib = "efl" ] 100 ssh download.enlightenment.org tar xf /srv/web/docs.enlightenment.org/public_html/efl/efl-$VERSION-doc.tar.bz2 -C /srv/web/docs.enlightenment.org/public_html/efl/
113 then 101 ssh download.enlightenment.org rm -r /srv/web/docs.enlightenment.org/public_html/efl/$VERSION_SIMPLE
114 scp $lib-$VERSION-doc.tar.bz2 download.enlightenment.org:/srv/web/docs.enlightenment.org/public_html/$lib/ 102 ssh download.enlightenment.org mv /srv/web/docs.enlightenment.org/public_html/efl/efl-$VERSION-doc/doc/html /srv/web/docs.enlightenment.org/public_html/efl/$VERSION_SIMPLE
115 ssh download.enlightenment.org tar xf /srv/web/docs.enlightenment.org/public_html/$lib/$lib-$VERSION-doc.tar.bz2 -C /srv/web/docs.enlightenment.org/public_html/$lib/ 103 ssh download.enlightenment.org rm -r /srv/web/docs.enlightenment.org/public_html/efl/efl-$VERSION-doc
116 ssh download.enlightenment.org rm -r /srv/web/docs.enlightenment.org/public_html/$lib/$VERSION_SIMPLE 104 ssh download.enlightenment.org rm /srv/web/docs.enlightenment.org/public_html/efl/efl-$VERSION-doc.tar.bz2
117 ssh download.enlightenment.org mv /srv/web/docs.enlightenment.org/public_html/$lib/$lib-$VERSION-doc/doc/html /srv/web/docs.enlightenment.org/public_html/$lib/$VERSION_SIMPLE 105
118 ssh download.enlightenment.org rm -r /srv/web/docs.enlightenment.org/public_html/$lib/$lib-$VERSION-doc 106 ssh download.enlightenment.org rm /srv/web/docs.enlightenment.org/public_html/efl/current
119 ssh download.enlightenment.org rm /srv/web/docs.enlightenment.org/public_html/$lib/$lib-$VERSION-doc.tar.bz2 107 ssh download.enlightenment.org ln -s /srv/web/docs.enlightenment.org/public_html/efl/$VERSION_SIMPLE /srv/web/docs.enlightenment.org/public_html/efl/current
120
121 ssh download.enlightenment.org rm /srv/web/docs.enlightenment.org/public_html/$lib/current
122 ssh download.enlightenment.org ln -s /srv/web/docs.enlightenment.org/public_html/$lib/$VERSION_SIMPLE /srv/web/docs.enlightenment.org/public_html/$lib/current
123 fi
124
125# Sed version to .99 and dev mode
126 fi 108 fi
127 109
128 cd .. 110 cd ..
129 echo 111 echo
130 echo "Finalized $lib. Please push changes to repo now." 112 echo "Finalized efl. Please push changes to repo now."
131 echo 113 echo
132} 114}
133 115
@@ -148,20 +130,10 @@ Options:
148 --finalise Finalise a release. Move to the right location, git tags, etc 130 --finalise Finalise a release. Move to the right location, git tags, etc
149 --help Show this message 131 --help Show this message
150 132
151
152EOF 133EOF
153exit 0 134exit 0
154} 135}
155 136
156# how many CPUs?
157if [ -f /proc/cpuinfo ]
158then
159 cpus="`grep ^processor /proc/cpuinfo | wc -l`"
160 cpus=$(($cpus+2))
161fi
162[ "$cpus" ] || cpus=4
163MAKEFLAGS="-j$cpus"
164
165while [ $# -ge 1 ] 137while [ $# -ge 1 ]
166do 138do
167 case "$1" in 139 case "$1" in
@@ -185,21 +157,17 @@ do
185 shift 157 shift
186done 158done
187 159
188for e in $libs 160if [ ! -d "efl" ]
189do 161then
190 if [ ! -d "$e" ] 162 echo "efl directory missing?"
191 then 163 exit 1
192 echo "$e directory missing?" 164fi
193 exit 1
194 fi
195
196 if [ $PREPARE = 1 ]
197 then
198 do_package_and_upload "$e"
199 fi
200 if [ $FINALISE = 1 ]
201 then
202 do_finalize_release "$e"
203 fi
204 165
205done 166if [ $PREPARE = 1 ]
167then
168 do_package_and_upload
169fi
170if [ $FINALISE = 1 ]
171then
172 do_finalize_release
173fi