mirror of
https://github.com/SELinuxProject/selinux
synced 2025-05-02 23:58:03 +00:00
As per discussed at github issue[1] and mailing list[2], we consider a version format of X.Y starting at 3.2. [1]: https://github.com/SELinuxProject/selinux/issues/270 [2]: https://lore.kernel.org/selinux/87d004wan2.fsf@redhat.com/T/#u Signed-off-by: Hu Keping <hukeping@huawei.com>
79 lines
1.9 KiB
Bash
Executable File
79 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
PWD=`pwd`
|
|
WIKIDIR=../selinux.wiki
|
|
|
|
if [ \! -d $WIKIDIR ]; then
|
|
git clone git@github.com:SELinuxProject/selinux.wiki.git $WIKIDIR
|
|
fi
|
|
|
|
RELEASE_TAG=`cat VERSION`
|
|
DEST=releases/$RELEASE_TAG
|
|
DIRS="libsepol libselinux libsemanage checkpolicy secilc policycoreutils mcstrans restorecond semodule-utils"
|
|
DIRS_NEED_PREFIX="dbus gui python sandbox"
|
|
|
|
git tag -a $RELEASE_TAG -m "Release $RELEASE_TAG"
|
|
|
|
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
|
|
|
|
for i in $DIRS_NEED_PREFIX; do
|
|
cd $i
|
|
VERS=`cat VERSION`
|
|
ARCHIVE=selinux-$i-$VERS.tar.gz
|
|
git tag selinux-$i-$VERS > /dev/null 2>&1
|
|
git archive --format=tar --prefix=selinux-$i-$VERS/ selinux-$i-$VERS | gzip > ../$DEST/$ARCHIVE
|
|
cd ..
|
|
done
|
|
|
|
cd $DEST
|
|
|
|
git add .
|
|
|
|
echo "Add the following to the $WIKIDIR/Releases.md wiki page:"
|
|
|
|
echo ""
|
|
|
|
echo "## Release $RELEASE_TAG"
|
|
|
|
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 ""
|
|
|
|
for i in *.tar.gz; do
|
|
|
|
echo -n "[$i](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/$i) "
|
|
sha256sum $i | cut -d " " -f 1
|
|
echo ""
|
|
done
|
|
|
|
echo "And then run:"
|
|
echo " cd $WIKIDIR"
|
|
echo " git commit -m \"Release $RELEASE_TAG\" -a -s"
|
|
echo " git push"
|
|
|
|
echo ""
|
|
echo "Push the release and its tags to git via:"
|
|
echo " git push"
|
|
echo " git push --tags"
|
|
|
|
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"
|