2009-03-12 05:23:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-10-06 16:45:18 +00:00
|
|
|
PWD=`pwd`
|
|
|
|
WIKIDIR=../selinux.wiki
|
|
|
|
|
2016-10-14 15:36:11 +00:00
|
|
|
if [ \! -d $WIKIDIR ]; then
|
|
|
|
git clone git@github.com:SELinuxProject/selinux.wiki.git $WIKIDIR
|
2016-10-06 16:45:18 +00:00
|
|
|
fi
|
|
|
|
|
2019-01-24 20:54:57 +00:00
|
|
|
RELEASE_TAG=$(date '+%Y%m%d')
|
|
|
|
DEST=releases/$RELEASE_TAG
|
2016-11-04 19:45:16 +00:00
|
|
|
DIRS="libsepol libselinux libsemanage checkpolicy secilc policycoreutils mcstrans restorecond semodule-utils"
|
|
|
|
DIRS_NEED_PREFIX="dbus gui python sandbox"
|
2009-03-12 05:23:32 +00:00
|
|
|
|
2019-01-24 20:54:57 +00:00
|
|
|
git tag -a $RELEASE_TAG -m "Release $RELEASE_TAG"
|
2013-10-30 18:28:30 +00:00
|
|
|
|
2013-10-31 18:23:26 +00:00
|
|
|
rm -rf $DEST
|
|
|
|
mkdir -p $DEST
|
2009-03-12 05:23:32 +00:00
|
|
|
|
|
|
|
for i in $DIRS; do
|
|
|
|
cd $i
|
2013-10-31 18:23:26 +00: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 05:23:32 +00:00
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
2016-11-04 19:45:16 +00:00
|
|
|
for i in $DIRS_NEED_PREFIX; do
|
|
|
|
cd $i
|
|
|
|
VERS=`cat VERSION`
|
|
|
|
ARCHIVE=selinux-$i-$VERS.tar.gz
|
2016-11-08 19:40:12 +00:00
|
|
|
git tag selinux-$i-$VERS > /dev/null 2>&1
|
2016-11-04 19:45:16 +00:00
|
|
|
git archive --format=tar --prefix=selinux-$i-$VERS/ selinux-$i-$VERS | gzip > ../$DEST/$ARCHIVE
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
2013-10-31 18:23:26 +00:00
|
|
|
cd $DEST
|
2013-10-30 18:28:30 +00:00
|
|
|
|
2016-10-14 15:36:11 +00:00
|
|
|
git add .
|
2016-10-06 16:45:18 +00:00
|
|
|
|
2016-10-14 15:36:11 +00:00
|
|
|
echo "Add the following to the $WIKIDIR/Releases.md wiki page:"
|
2013-10-31 18:23:26 +00:00
|
|
|
|
|
|
|
echo ""
|
2013-10-30 18:28:30 +00:00
|
|
|
|
2014-08-27 15:32:34 +00:00
|
|
|
echo "## Release $(date '+%Y-%m-%d')"
|
2013-10-30 18:28:30 +00:00
|
|
|
|
2019-01-24 20:54:57 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "[Release Notes](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/RELEASE-$RELEASE_TAG.txt)"
|
|
|
|
echo ""
|
|
|
|
echo "[full log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/log-$RELEASE_TAG.txt)"
|
|
|
|
echo ""
|
|
|
|
echo "[short log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/shortlog-$RELEASE_TAG.txt)"
|
|
|
|
echo ""
|
|
|
|
|
2013-10-30 18:28:30 +00:00
|
|
|
for i in *.tar.gz; do
|
2014-08-27 15:32:34 +00:00
|
|
|
|
2019-01-24 20:54:57 +00:00
|
|
|
echo -n "[$i](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/$i) "
|
2014-12-02 17:48:04 +00:00
|
|
|
sha256sum $i | cut -d " " -f 1
|
2013-10-30 18:28:30 +00:00
|
|
|
echo ""
|
|
|
|
done
|
2016-10-06 16:45:18 +00:00
|
|
|
|
|
|
|
echo "And then run:"
|
2016-10-14 15:47:29 +00:00
|
|
|
echo " cd $WIKIDIR"
|
2019-01-24 20:54:57 +00:00
|
|
|
echo " git commit -m \"Release $RELEASE_TAG\" -a -s"
|
2016-10-14 15:47:29 +00:00
|
|
|
echo " git push"
|
2016-10-06 16:45:18 +00:00
|
|
|
|
2016-10-14 15:47:29 +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"
|
2019-01-24 20:54:57 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Create a new release from the latest tag on https://github.com/SELinuxProject/selinux/tags"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Add files from releases/$RELEASE_TAG as assets to the new github release"
|