2009-03-12 06:23:32 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-10-30 19:28:30 +01:00
|
|
|
DEST=../selinux-$(date '+%Y%m%d')
|
2015-03-31 18:41:28 +02:00
|
|
|
DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy secilc sepolgen"
|
2009-03-12 06:23:32 +01:00
|
|
|
|
2013-10-30 19:28:30 +01:00
|
|
|
git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"
|
|
|
|
|
2013-10-31 19:23:26 +01:00
|
|
|
rm -rf $DEST
|
|
|
|
mkdir -p $DEST
|
2009-03-12 06:23:32 +01:00
|
|
|
|
|
|
|
for i in $DIRS; do
|
|
|
|
cd $i
|
2013-10-31 19:23:26 +01:00
|
|
|
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
|
2009-03-12 06:23:32 +01:00
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
2013-10-31 19:23:26 +01:00
|
|
|
cd $DEST
|
2013-10-30 19:28:30 +01:00
|
|
|
|
2013-10-31 19:23:26 +01:00
|
|
|
echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:"
|
|
|
|
|
|
|
|
echo ""
|
2013-10-30 19:28:30 +01:00
|
|
|
|
2014-08-27 17:32:34 +02:00
|
|
|
echo "## Release $(date '+%Y-%m-%d')"
|
2013-10-30 19:28:30 +01:00
|
|
|
|
|
|
|
for i in *.tar.gz; do
|
2014-08-27 17:32:34 +02:00
|
|
|
|
|
|
|
echo -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) "
|
2014-12-02 18:48:04 +01:00
|
|
|
sha256sum $i | cut -d " " -f 1
|
2013-10-30 19:28:30 +01:00
|
|
|
echo ""
|
|
|
|
done
|