mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-15 02:24:38 +00:00
1a27b5add9
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 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
|
|
|
|
DEST=$WIKIDIR/files/releases/$(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
|
|
|
|
git add .
|
|
|
|
echo "Add the following to the $WIKIDIR/Releases.md 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
|
|
|
|
echo "And then run:"
|
|
echo " cd $WIKIDIR"
|
|
echo " git commit -m \"Release $(date '+%Y%m%d')\" -a -s"
|
|
echo " git push"
|
|
|
|
echo ""
|
|
echo "Push the release and its tags to git via:"
|
|
echo " git push"
|
|
echo " git push --tags"
|