update for releases with git.
This commit is contained in:
parent
aaaad89244
commit
fd2b22474f
2 changed files with 31 additions and 7 deletions
|
@ -347,8 +347,8 @@ PRIVATE void announce(void)
|
||||||
{
|
{
|
||||||
/* Display the MINIX startup banner. */
|
/* Display the MINIX startup banner. */
|
||||||
printf("\nMINIX %s.%s. "
|
printf("\nMINIX %s.%s. "
|
||||||
#ifdef _SVN_REVISION
|
#ifdef _VCS_REVISION
|
||||||
"(" _SVN_REVISION ")\n"
|
"(" _VCS_REVISION ")\n"
|
||||||
#endif
|
#endif
|
||||||
"Copyright 2010, Vrije Universiteit, Amsterdam, The Netherlands\n",
|
"Copyright 2010, Vrije Universiteit, Amsterdam, The Netherlands\n",
|
||||||
OS_RELEASE, OS_VERSION);
|
OS_RELEASE, OS_VERSION);
|
||||||
|
|
|
@ -177,6 +177,15 @@ PACKAGES=1
|
||||||
MINIMAL=0
|
MINIMAL=0
|
||||||
MAKEMAP=0
|
MAKEMAP=0
|
||||||
|
|
||||||
|
# Do we have git?
|
||||||
|
if git --version >/dev/null
|
||||||
|
then if [ -d ../.git ]
|
||||||
|
then REVTAG="`git describe --always`"
|
||||||
|
echo "git mode; building $REVTAG"
|
||||||
|
GITMODE=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
FILENAMEOUT=""
|
FILENAMEOUT=""
|
||||||
|
|
||||||
while getopts "s:pmMchu?r:f:" c
|
while getopts "s:pmMchu?r:f:" c
|
||||||
|
@ -273,6 +282,8 @@ cp -rp /usr/lib $RELEASEDIR/usr
|
||||||
cp -rp /bin/sh /bin/echo $RELEASEDIR/bin
|
cp -rp /bin/sh /bin/echo $RELEASEDIR/bin
|
||||||
cp -rp /usr/bin/make /usr/bin/install /usr/bin/yacc /usr/bin/lex /usr/bin/asmconv $RELEASEDIR/usr/bin
|
cp -rp /usr/bin/make /usr/bin/install /usr/bin/yacc /usr/bin/lex /usr/bin/asmconv $RELEASEDIR/usr/bin
|
||||||
|
|
||||||
|
CONFIGHEADER=$RELEASEDIR/usr/src/include/minix/sys_config.h
|
||||||
|
|
||||||
if [ -d $PACKAGEDIR -a -f $PACKAGELIST -a $PACKAGES -ne 0 ]
|
if [ -d $PACKAGEDIR -a -f $PACKAGELIST -a $PACKAGES -ne 0 ]
|
||||||
then
|
then
|
||||||
index=pkg_summary
|
index=pkg_summary
|
||||||
|
@ -327,7 +338,7 @@ fi
|
||||||
chown -R root $RELEASEDIR/usr/lib
|
chown -R root $RELEASEDIR/usr/lib
|
||||||
chmod -R u+w $RELEASEDIR/usr/lib
|
chmod -R u+w $RELEASEDIR/usr/lib
|
||||||
|
|
||||||
if [ "$COPY" -ne 1 ]
|
if [ "$COPY" -ne 1 -a "$GITMODE" -ne 1 ]
|
||||||
then
|
then
|
||||||
echo " * Doing new svn export"
|
echo " * Doing new svn export"
|
||||||
TOOLSREPO="`svn info | grep '^URL: ' | awk '{ print $2 }'`"
|
TOOLSREPO="`svn info | grep '^URL: ' | awk '{ print $2 }'`"
|
||||||
|
@ -344,9 +355,9 @@ then
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
/* Added by release script */
|
/* Added by release script */
|
||||||
#ifndef _SVN_REVISION
|
#ifndef _VCS_REVISION
|
||||||
#define _SVN_REVISION \"$REVTAG\"
|
#define _VCS_REVISION \"$REVTAG\"
|
||||||
#endif" >>$RELEASEDIR/usr/src/include/minix/sys_config.h
|
#endif" >>$CONFIGHEADER
|
||||||
|
|
||||||
# output image name
|
# output image name
|
||||||
if [ "$USB" -ne 0 ]; then
|
if [ "$USB" -ne 0 ]; then
|
||||||
|
@ -355,13 +366,26 @@ else
|
||||||
IMG=${IMG_BASE}_${REVTAG}.iso
|
IMG=${IMG_BASE}_${REVTAG}.iso
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
elif [ "$COPY" -eq 1 ]
|
||||||
|
then
|
||||||
( cd .. && make depend && make clean )
|
( cd .. && make depend && make clean )
|
||||||
srcdir=/usr/$SRC
|
srcdir=/usr/$SRC
|
||||||
( cd $srcdir && tar cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
( cd $srcdir && tar cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
||||||
REVTAG=copy
|
REVTAG=copy
|
||||||
REVISION=unknown
|
REVISION=unknown
|
||||||
IMG=${IMG_BASE}_copy.iso
|
IMG=${IMG_BASE}_copy.iso
|
||||||
|
elif [ "$GITMODE" -eq 1 ]
|
||||||
|
then
|
||||||
|
srcdir=$RELEASEDIR/usr/src
|
||||||
|
git clone file://.. $srcdir
|
||||||
|
( cd $srcdir && git checkout $REVTAG && rm -r .git )
|
||||||
|
echo "
|
||||||
|
|
||||||
|
/* Added by release script */
|
||||||
|
#ifndef _VCS_REVISION
|
||||||
|
#define _VCS_REVISION \"$REVTAG\"
|
||||||
|
#endif" >>$CONFIGHEADER
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " * Fixups for owners and modes of dirs and files"
|
echo " * Fixups for owners and modes of dirs and files"
|
||||||
|
|
Loading…
Reference in a new issue