selinux/scripts/release

53 lines
1.1 KiB
Plaintext
Raw Normal View History

2009-03-12 05:23:32 +00:00
#!/bin/bash
2016-10-06 16:45:18 +00:00
PWD=`pwd`
WIKIDIR=../selinux.wiki
if [ \! -d $WIKIDIR ]; then
git clone git@github.com:SELinuxProject/selinux.wiki.git $WIKIDIR
2016-10-06 16:45:18 +00:00
fi
DEST=$WIKIDIR/files/releases/$(date '+%Y%m%d')
DIRS="libsepol libselinux libsemanage checkpolicy secilc policycoreutils dbus gui mcstrans python restorecond sandbox semodule-utils"
2009-03-12 05:23:32 +00:00
git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"
rm -rf $DEST
mkdir -p $DEST
2009-03-12 05:23:32 +00:00
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
2009-03-12 05:23:32 +00:00
cd ..
done
cd $DEST
git add .
2016-10-06 16:45:18 +00:00
echo "Add the following to the $WIKIDIR/Releases.md wiki page:"
echo ""
2014-08-27 15:32:34 +00:00
echo "## Release $(date '+%Y-%m-%d')"
for i in *.tar.gz; do
2014-08-27 15:32:34 +00:00
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
2016-10-06 16:45:18 +00:00
echo "And then run:"
echo " cd $WIKIDIR"
echo " git commit -m \"Release $(date '+%Y%m%d')\" -a -s"
echo " git push"
2016-10-06 16:45:18 +00:00
echo ""
2016-10-06 16:45:18 +00:00
echo "Push the release and its tags to git via:"
echo " git push"
echo " git push --tags"