selinux/scripts/release
Stephen Smalley f64918ff71 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>
2013-10-31 14:34:02 -04:00

34 lines
718 B
Bash
Executable File

#!/bin/bash
DEST=../selinux-$(date '+%Y%m%d')
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
for i in $DIRS; do
cd $i
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
cd $DEST
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') =="
for i in *.tar.gz; do
echo "[http://userspace.selinuxproject.org/releases/$(date '+%Y%m%d')/$i $i]"
echo ""
echo "`sha256sum $i`"
echo ""
done