1 #!/bin/bash 2 3 DEST=../selinux-$(date '+%Y%m%d') 4 DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy secilc sepolgen" 5 6 git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')" 7 8 rm -rf $DEST 9 mkdir -p $DEST 10 11 for i in $DIRS; do 12 cd $i 13 VERS=`cat VERSION` 14 ARCHIVE=$i-$VERS.tar.gz 15 git tag $i-$VERS > /dev/null 2>&1 16 git archive --format=tar --prefix=$i-$VERS/ $i-$VERS | gzip > ../$DEST/$ARCHIVE 17 cd .. 18 done 19 20 cd $DEST 21 22 echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:" 23 24 echo "" 25 26 echo "## Release $(date '+%Y-%m-%d')" 27 28 for i in *.tar.gz; do 29 30 echo -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) " 31 sha256sum $i | cut -d " " -f 1 32 echo "" 33 done 34