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
This commit is contained in:
parent
3f3d98ee58
commit
ef183144ad
2 changed files with 42 additions and 17 deletions
|
@ -103,8 +103,8 @@ def gather_deps(deps, arch, directory):
|
|||
## And package them up
|
||||
os.chdir(directory)
|
||||
print("Zipping: {}".format(arch))
|
||||
check_output_maybe("zip -9r ../../emacs-{}-{}-deps.zip *"
|
||||
.format(EMACS_MAJOR_VERSION, arch),
|
||||
check_output_maybe("zip -9r ../../emacs-{}-{}{}-deps.zip *"
|
||||
.format(EMACS_MAJOR_VERSION, DATE, arch),
|
||||
shell=True)
|
||||
os.chdir("../../")
|
||||
|
||||
|
@ -168,8 +168,8 @@ def gather_source(deps):
|
|||
p.map(download_source,to_download)
|
||||
|
||||
print("Zipping")
|
||||
check_output_maybe("zip -9 ../emacs-{}-deps-mingw-w64-src.zip *"
|
||||
.format(EMACS_MAJOR_VERSION),
|
||||
check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *"
|
||||
.format(EMACS_MAJOR_VERSION,DATE),
|
||||
shell=True)
|
||||
|
||||
os.chdir("..")
|
||||
|
@ -189,13 +189,16 @@ def clean():
|
|||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-s", help="snapshot build",
|
||||
action="store_true")
|
||||
|
||||
parser.add_argument("-t", help="32 bit deps only",
|
||||
action="store_true")
|
||||
|
||||
parser.add_argument("-f", help="64 bit deps only",
|
||||
action="store_true")
|
||||
|
||||
parser.add_argument("-s", help="source code only",
|
||||
parser.add_argument("-r", help="source code only",
|
||||
action="store_true")
|
||||
|
||||
parser.add_argument("-c", help="clean only",
|
||||
|
@ -205,19 +208,24 @@ def clean():
|
|||
action="store_true")
|
||||
|
||||
args = parser.parse_args()
|
||||
do_all=not (args.c or args.s or args.f or args.t)
|
||||
do_all=not (args.c or args.r or args.f or args.t)
|
||||
|
||||
deps=extract_deps()
|
||||
|
||||
DRY_RUN=args.d
|
||||
|
||||
if args.s:
|
||||
DATE="{}-".format(check_output(["date", "+%Y-%m-%d"]).decode("utf-8").strip())
|
||||
else:
|
||||
DATE=""
|
||||
|
||||
if( do_all or args.t ):
|
||||
gather_deps(deps,"i686","mingw32")
|
||||
|
||||
if( do_all or args.f ):
|
||||
gather_deps(deps,"x86_64","mingw64")
|
||||
|
||||
if( do_all or args.s ):
|
||||
if( do_all or args.r ):
|
||||
gather_source(deps)
|
||||
|
||||
if( args.c ):
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
function git_up {
|
||||
echo Making git worktree for Emacs $VERSION
|
||||
echo [build] Making git worktree for Emacs $VERSION
|
||||
cd $HOME/emacs-build/git/emacs-$MAJOR_VERSION
|
||||
git pull
|
||||
git worktree add ../$BRANCH $BRANCH
|
||||
|
@ -34,7 +34,7 @@ function build_zip {
|
|||
PKG=$2
|
||||
HOST=$3
|
||||
|
||||
echo Building Emacs-$VERSION for $ARCH
|
||||
echo [build] Building Emacs-$VERSION for $ARCH
|
||||
if [ $ARCH == "i686" ]
|
||||
then
|
||||
PATH=/mingw32/bin:$PATH
|
||||
|
@ -52,11 +52,12 @@ function build_zip {
|
|||
## time that is not always needed
|
||||
if (($CONFIG))
|
||||
then
|
||||
../../../git/$BRANCH/configure \
|
||||
--without-dbus \
|
||||
--host=$HOST --without-compress-install \
|
||||
$CACHE \
|
||||
CFLAGS="-O2 -static -g3"
|
||||
echo [build] Configuring Emacs $ARCH
|
||||
../../../git/$BRANCH/configure \
|
||||
--without-dbus \
|
||||
--host=$HOST --without-compress-install \
|
||||
$CACHE \
|
||||
CFLAGS="-O2 -static -g3"
|
||||
fi
|
||||
|
||||
make -j 16 install \
|
||||
|
@ -66,7 +67,18 @@ function build_zip {
|
|||
zip -r -9 emacs-$OF_VERSION-$ARCH-no-deps.zip *
|
||||
mv emacs-$OF_VERSION-$ARCH-no-deps.zip $HOME/emacs-upload
|
||||
rm bin/libXpm-noX4.dll
|
||||
unzip $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip
|
||||
|
||||
if [ -z $SNAPSHOT ];
|
||||
then
|
||||
DEPS_FILE=$HOME/emacs-build/deps/emacs-$MAJOR_VERSION-$ARCH-deps.zip
|
||||
else
|
||||
## Pick the most recent snapshot whatever that is
|
||||
DEPS_FILE=`ls $HOME/emacs-build/deps/emacs-$MAJOR_VERSION-*-$ARCH-deps.zip | tail -n 1`
|
||||
fi
|
||||
|
||||
echo [build] Using $DEPS_FILE
|
||||
unzip $DEPS_FILE
|
||||
|
||||
zip -r -9 emacs-$OF_VERSION-$ARCH.zip *
|
||||
mv emacs-$OF_VERSION-$ARCH.zip ~/emacs-upload
|
||||
}
|
||||
|
@ -74,7 +86,7 @@ function build_zip {
|
|||
function build_installer {
|
||||
ARCH=$1
|
||||
cd $HOME/emacs-build/install/emacs-$VERSION
|
||||
echo Calling makensis in `pwd`
|
||||
echo [build] Calling makensis in `pwd`
|
||||
cp ../../git/$BRANCH/admin/nt/dist-build/emacs.nsi .
|
||||
|
||||
makensis -v4 \
|
||||
|
@ -148,14 +160,19 @@ fi
|
|||
|
||||
if [ -z $VERSION ];
|
||||
then
|
||||
echo Cannot determine Emacs version
|
||||
echo [build] Cannot determine Emacs version
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)"
|
||||
|
||||
## ACTUAL VERSION is the version declared by emacs
|
||||
ACTUAL_VERSION=$VERSION
|
||||
|
||||
## VERSION includes the word snapshot if necessary
|
||||
VERSION=$VERSION$SNAPSHOT
|
||||
|
||||
## OF version includes the date if we have a snapshot
|
||||
OF_VERSION=$VERSION
|
||||
|
||||
if [ -z $SNAPSHOT ];
|
||||
|
|
Loading…
Add table
Reference in a new issue