Add make-update script and fix release script.
make-update script is for generating an update for an existing release, e.g. for a bug fix update. release script is for generating a new release. Per-package tagging may fail on the release script if the version has not changed; this is harmless. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
ac74dde4ae
commit
f64918ff71
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# != 2 ]; then
|
||||
echo "Usage: $0 last-release-date package-to-update"
|
||||
echo " e.g. $0 20131030 sepolgen"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$1
|
||||
PKG=$2
|
||||
|
||||
DEST=../update-$TAG
|
||||
mkdir -p $DEST
|
||||
|
||||
if [ \! -d $PKG ]; then
|
||||
echo "$PKG does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $PKG
|
||||
VERS=`cat VERSION`
|
||||
ARCHIVE=$PKG-$VERS.tar.gz
|
||||
git tag $PKG-$VERS
|
||||
git archive --format=tar --prefix=$PKG-$VERS/ $PKG-$VERS | gzip > ../$DEST/$ARCHIVE
|
||||
cd ..
|
||||
|
||||
cd $DEST
|
||||
|
||||
echo "Copy $ARCHIVE from $DEST to the server and update its download link and checksum on the Releases wiki page:"
|
||||
|
||||
echo ""
|
||||
|
||||
echo "[http://userspace.selinuxproject.org/releases/$TAG/$ARCHIVE $ARCHIVE]"
|
||||
echo ""
|
||||
echo "`sha256sum $ARCHIVE`"
|
||||
echo ""
|
|
@ -5,18 +5,23 @@ DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy sepolgen"
|
|||
|
||||
git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"
|
||||
|
||||
rm -rf $(DEST)
|
||||
mkdir -p $(DEST)
|
||||
rm -rf $DEST
|
||||
mkdir -p $DEST
|
||||
|
||||
for i in $DIRS; do
|
||||
cd $i
|
||||
git archive --format=tar --prefix=$i-`cat VERSION`/ HEAD | gzip > ../$(DEST)/$i-`cat VERSION`.tar.gz
|
||||
VERS=`cat VERSION`
|
||||
ARCHIVE=$i-$VERS.tar.gz
|
||||
git tag $i-$VERS > /dev/null 2>&1
|
||||
git archive --format=tar --prefix=$i-$VERS/ $i-$VERS | gzip > ../$DEST/$ARCHIVE
|
||||
cd ..
|
||||
done
|
||||
|
||||
pushd $(DEST)
|
||||
cd $DEST
|
||||
|
||||
echo "Copy contents of $(DEST) to the server and add the following to the Releases wiki page:"
|
||||
echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:"
|
||||
|
||||
echo ""
|
||||
|
||||
echo "== Release $(date '+%Y-%m-%d') =="
|
||||
|
||||
|
@ -26,5 +31,3 @@ for i in *.tar.gz; do
|
|||
echo "`sha256sum $i`"
|
||||
echo ""
|
||||
done
|
||||
|
||||
popd
|
||||
|
|
Loading…
Reference in New Issue