platform_external_selinux/scripts/release
Stephen Smalley 1b7f3248ec Add secilc to release script.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-03-31 12:41:28 -04:00

33 lines
760 B
Bash
Executable file

#!/bin/bash
DEST=../selinux-$(date '+%Y%m%d')
DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy secilc 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 -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) "
sha256sum $i | cut -d " " -f 1
echo ""
done