diff options
| author | Phillip Lord | 2017-11-29 21:28:44 +0000 |
|---|---|---|
| committer | Phillip Lord | 2017-11-30 22:59:39 +0000 |
| commit | ef183144add2b92359a9ade2ec0b28681b26956b (patch) | |
| tree | 7b154cbf32bbf5c7264ab20818011271f58dde78 /admin | |
| parent | 3f3d98ee5851840228786390ee7dbf851d144eb8 (diff) | |
| download | emacs-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-x | admin/nt/dist-build/build-dep-zips.py | 22 | ||||
| -rwxr-xr-x | admin/nt/dist-build/build-zips.sh | 37 |
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 | ||
| 191 | parser = argparse.ArgumentParser() | 191 | parser = argparse.ArgumentParser() |
| 192 | parser.add_argument("-s", help="snapshot build", | ||
| 193 | action="store_true") | ||
| 194 | |||
| 192 | parser.add_argument("-t", help="32 bit deps only", | 195 | parser.add_argument("-t", help="32 bit deps only", |
| 193 | action="store_true") | 196 | action="store_true") |
| 194 | 197 | ||
| 195 | parser.add_argument("-f", help="64 bit deps only", | 198 | parser.add_argument("-f", help="64 bit deps only", |
| 196 | action="store_true") | 199 | action="store_true") |
| 197 | 200 | ||
| 198 | parser.add_argument("-s", help="source code only", | 201 | parser.add_argument("-r", help="source code only", |
| 199 | action="store_true") | 202 | action="store_true") |
| 200 | 203 | ||
| 201 | parser.add_argument("-c", help="clean only", | 204 | parser.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 | ||
| 207 | args = parser.parse_args() | 210 | args = parser.parse_args() |
| 208 | do_all=not (args.c or args.s or args.f or args.t) | 211 | do_all=not (args.c or args.r or args.f or args.t) |
| 209 | 212 | ||
| 210 | deps=extract_deps() | 213 | deps=extract_deps() |
| 211 | 214 | ||
| 212 | DRY_RUN=args.d | 215 | DRY_RUN=args.d |
| 213 | 216 | ||
| 217 | if args.s: | ||
| 218 | DATE="{}-".format(check_output(["date", "+%Y-%m-%d"]).decode("utf-8").strip()) | ||
| 219 | else: | ||
| 220 | DATE="" | ||
| 221 | |||
| 214 | if( do_all or args.t ): | 222 | if( do_all or args.t ): |
| 215 | gather_deps(deps,"i686","mingw32") | 223 | gather_deps(deps,"i686","mingw32") |
| 216 | 224 | ||
| 217 | if( do_all or args.f ): | 225 | if( do_all or args.f ): |
| 218 | gather_deps(deps,"x86_64","mingw64") | 226 | gather_deps(deps,"x86_64","mingw64") |
| 219 | 227 | ||
| 220 | if( do_all or args.s ): | 228 | if( do_all or args.r ): |
| 221 | gather_source(deps) | 229 | gather_source(deps) |
| 222 | 230 | ||
| 223 | if( args.c ): | 231 | if( 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 | ||
| 21 | function git_up { | 21 | function 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 { | |||
| 74 | function build_installer { | 86 | function 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 | ||
| 149 | if [ -z $VERSION ]; | 161 | if [ -z $VERSION ]; |
| 150 | then | 162 | then |
| 151 | echo Cannot determine Emacs version | 163 | echo [build] Cannot determine Emacs version |
| 152 | exit 1 | 164 | exit 1 |
| 153 | fi | 165 | fi |
| 154 | 166 | ||
| 155 | MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)" | 167 | MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)" |
| 156 | 168 | ||
| 169 | ## ACTUAL VERSION is the version declared by emacs | ||
| 157 | ACTUAL_VERSION=$VERSION | 170 | ACTUAL_VERSION=$VERSION |
| 171 | |||
| 172 | ## VERSION includes the word snapshot if necessary | ||
| 158 | VERSION=$VERSION$SNAPSHOT | 173 | VERSION=$VERSION$SNAPSHOT |
| 174 | |||
| 175 | ## OF version includes the date if we have a snapshot | ||
| 159 | OF_VERSION=$VERSION | 176 | OF_VERSION=$VERSION |
| 160 | 177 | ||
| 161 | if [ -z $SNAPSHOT ]; | 178 | if [ -z $SNAPSHOT ]; |