aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorPhillip Lord2017-11-29 21:28:44 +0000
committerPhillip Lord2017-11-30 22:59:39 +0000
commitef183144add2b92359a9ade2ec0b28681b26956b (patch)
tree7b154cbf32bbf5c7264ab20818011271f58dde78 /admin
parent3f3d98ee5851840228786390ee7dbf851d144eb8 (diff)
downloademacs-ef183144add2b92359a9ade2ec0b28681b26956b.tar.gz
emacs-ef183144add2b92359a9ade2ec0b28681b26956b.zip
Add date to dependency and source zips for snapshots
* admin/nt/dist-build/build-zips.sh, admin/nt/dist-build/build-dep-zips.py: Support snapshot naming
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/nt/dist-build/build-dep-zips.py22
-rwxr-xr-xadmin/nt/dist-build/build-zips.sh37
2 files changed, 42 insertions, 17 deletions
diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
index f71988692c1..6ec8fafaf8b 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -103,8 +103,8 @@ def gather_deps(deps, arch, directory):
103 ## And package them up 103 ## And package them up
104 os.chdir(directory) 104 os.chdir(directory)
105 print("Zipping: {}".format(arch)) 105 print("Zipping: {}".format(arch))
106 check_output_maybe("zip -9r ../../emacs-{}-{}-deps.zip *" 106 check_output_maybe("zip -9r ../../emacs-{}-{}{}-deps.zip *"
107 .format(EMACS_MAJOR_VERSION, arch), 107 .format(EMACS_MAJOR_VERSION, DATE, arch),
108 shell=True) 108 shell=True)
109 os.chdir("../../") 109 os.chdir("../../")
110 110
@@ -168,8 +168,8 @@ def gather_source(deps):
168 p.map(download_source,to_download) 168 p.map(download_source,to_download)
169 169
170 print("Zipping") 170 print("Zipping")
171 check_output_maybe("zip -9 ../emacs-{}-deps-mingw-w64-src.zip *" 171 check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *"
172 .format(EMACS_MAJOR_VERSION), 172 .format(EMACS_MAJOR_VERSION,DATE),
173 shell=True) 173 shell=True)
174 174
175 os.chdir("..") 175 os.chdir("..")
@@ -189,13 +189,16 @@ if(os.environ["MSYSTEM"] != "MSYS"):
189 189
190 190
191parser = argparse.ArgumentParser() 191parser = argparse.ArgumentParser()
192parser.add_argument("-s", help="snapshot build",
193 action="store_true")
194
192parser.add_argument("-t", help="32 bit deps only", 195parser.add_argument("-t", help="32 bit deps only",
193 action="store_true") 196 action="store_true")
194 197
195parser.add_argument("-f", help="64 bit deps only", 198parser.add_argument("-f", help="64 bit deps only",
196 action="store_true") 199 action="store_true")
197 200
198parser.add_argument("-s", help="source code only", 201parser.add_argument("-r", help="source code only",
199 action="store_true") 202 action="store_true")
200 203
201parser.add_argument("-c", help="clean only", 204parser.add_argument("-c", help="clean only",
@@ -205,19 +208,24 @@ parser.add_argument("-d", help="dry run",
205 action="store_true") 208 action="store_true")
206 209
207args = parser.parse_args() 210args = parser.parse_args()
208do_all=not (args.c or args.s or args.f or args.t) 211do_all=not (args.c or args.r or args.f or args.t)
209 212
210deps=extract_deps() 213deps=extract_deps()
211 214
212DRY_RUN=args.d 215DRY_RUN=args.d
213 216
217if args.s:
218 DATE="{}-".format(check_output(["date", "+%Y-%m-%d"]).decode("utf-8").strip())
219else:
220 DATE=""
221
214if( do_all or args.t ): 222if( do_all or args.t ):
215 gather_deps(deps,"i686","mingw32") 223 gather_deps(deps,"i686","mingw32")
216 224
217if( do_all or args.f ): 225if( do_all or args.f ):
218 gather_deps(deps,"x86_64","mingw64") 226 gather_deps(deps,"x86_64","mingw64")
219 227
220if( do_all or args.s ): 228if( do_all or args.r ):
221 gather_source(deps) 229 gather_source(deps)
222 230
223if( args.c ): 231if( args.c ):
diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh
index 2c7b56866ff..5822d821a1c 100755
--- a/admin/nt/dist-build/build-zips.sh
+++ b/admin/nt/dist-build/build-zips.sh
@@ -19,7 +19,7 @@
19 19
20 20
21function git_up { 21function git_up {
22 echo Making git worktree for Emacs $VERSION 22 echo [build] Making git worktree for Emacs $VERSION
23 cd $HOME/emacs-build/git/emacs-$MAJOR_VERSION 23 cd $HOME/emacs-build/git/emacs-$MAJOR_VERSION
24 git pull 24 git pull
25 git worktree add ../$BRANCH $BRANCH 25 git worktree add ../$BRANCH $BRANCH
@@ -34,7 +34,7 @@ function build_zip {
34 PKG=$2 34 PKG=$2
35 HOST=$3 35 HOST=$3
36 36
37 echo Building Emacs-$VERSION for $ARCH 37 echo [build] Building Emacs-$VERSION for $ARCH
38 if [ $ARCH == "i686" ] 38 if [ $ARCH == "i686" ]
39 then 39 then
40 PATH=/mingw32/bin:$PATH 40 PATH=/mingw32/bin:$PATH
@@ -52,11 +52,12 @@ function build_zip {
52 ## time that is not always needed 52 ## time that is not always needed
53 if (($CONFIG)) 53 if (($CONFIG))
54 then 54 then
55 ../../../git/$BRANCH/configure \ 55 echo [build] Configuring Emacs $ARCH
56 --without-dbus \ 56 ../../../git/$BRANCH/configure \
57 --host=$HOST --without-compress-install \ 57 --without-dbus \
58 $CACHE \ 58 --host=$HOST --without-compress-install \
59 CFLAGS="-O2 -static -g3" 59 $CACHE \
60 CFLAGS="-O2 -static -g3"
60 fi 61 fi
61 62
62 make -j 16 install \ 63 make -j 16 install \
@@ -66,7 +67,18 @@ function build_zip {
66 zip -r -9 emacs-$OF_VERSION-$ARCH-no-deps.zip * 67 zip -r -9 emacs-$OF_VERSION-$ARCH-no-deps.zip *
67 mv emacs-$OF_VERSION-$ARCH-no-deps.zip $HOME/emacs-upload 68 mv emacs-$OF_VERSION-$ARCH-no-deps.zip $HOME/emacs-upload
68 rm bin/libXpm-noX4.dll 69 rm bin/libXpm-noX4.dll
69 unzip $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip 70
71 if [ -z $SNAPSHOT ];
72 then
73 DEPS_FILE=$HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip
74 else
75 ## Pick the most recent snapshot whatever that is
76 DEPS_FILE=`ls $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-*-$ARCH-deps.zip | tail -n 1`
77 fi
78
79 echo [build] Using $DEPS_FILE
80 unzip $DEPS_FILE
81
70 zip -r -9 emacs-$OF_VERSION-$ARCH.zip * 82 zip -r -9 emacs-$OF_VERSION-$ARCH.zip *
71 mv emacs-$OF_VERSION-$ARCH.zip ~/emacs-upload 83 mv emacs-$OF_VERSION-$ARCH.zip ~/emacs-upload
72} 84}
@@ -74,7 +86,7 @@ function build_zip {
74function build_installer { 86function build_installer {
75 ARCH=$1 87 ARCH=$1
76 cd $HOME/emacs-build/install/emacs-$VERSION 88 cd $HOME/emacs-build/install/emacs-$VERSION
77 echo Calling makensis in `pwd` 89 echo [build] Calling makensis in `pwd`
78 cp ../../git/$BRANCH/admin/nt/dist-build/emacs.nsi . 90 cp ../../git/$BRANCH/admin/nt/dist-build/emacs.nsi .
79 91
80 makensis -v4 \ 92 makensis -v4 \
@@ -148,14 +160,19 @@ fi
148 160
149if [ -z $VERSION ]; 161if [ -z $VERSION ];
150then 162then
151 echo Cannot determine Emacs version 163 echo [build] Cannot determine Emacs version
152 exit 1 164 exit 1
153fi 165fi
154 166
155MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)" 167MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)"
156 168
169## ACTUAL VERSION is the version declared by emacs
157ACTUAL_VERSION=$VERSION 170ACTUAL_VERSION=$VERSION
171
172## VERSION includes the word snapshot if necessary
158VERSION=$VERSION$SNAPSHOT 173VERSION=$VERSION$SNAPSHOT
174
175## OF version includes the date if we have a snapshot
159OF_VERSION=$VERSION 176OF_VERSION=$VERSION
160 177
161if [ -z $SNAPSHOT ]; 178if [ -z $SNAPSHOT ];