blob: 015e5c74671efa729e4f1399d99993756d067208 [file] [log] [blame]
Joshua Brindleff317eb2009-03-12 01:23:32 -04001#!/bin/bash
2
Stephen Smalley75740f42013-10-30 14:28:30 -04003DEST=../selinux-$(date '+%Y%m%d')
Stephen Smalley1b7f3242015-03-31 12:41:28 -04004DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy secilc sepolgen"
Joshua Brindleff317eb2009-03-12 01:23:32 -04005
Stephen Smalley75740f42013-10-30 14:28:30 -04006git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"
7
Stephen Smalleyf64918f2013-10-31 14:23:26 -04008rm -rf $DEST
9mkdir -p $DEST
Joshua Brindleff317eb2009-03-12 01:23:32 -040010
11for i in $DIRS; do
12 cd $i
Stephen Smalleyf64918f2013-10-31 14:23:26 -040013 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
Joshua Brindleff317eb2009-03-12 01:23:32 -040017 cd ..
18done
19
Stephen Smalleyf64918f2013-10-31 14:23:26 -040020cd $DEST
Stephen Smalley75740f42013-10-30 14:28:30 -040021
Stephen Smalleyf64918f2013-10-31 14:23:26 -040022echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:"
23
24echo ""
Stephen Smalley75740f42013-10-30 14:28:30 -040025
Steve Lawrence51516db2014-08-27 11:32:34 -040026echo "## Release $(date '+%Y-%m-%d')"
Stephen Smalley75740f42013-10-30 14:28:30 -040027
28for i in *.tar.gz; do
Steve Lawrence51516db2014-08-27 11:32:34 -040029
30 echo -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) "
Steve Lawrence5b9a1722014-12-02 12:48:04 -050031 sha256sum $i | cut -d " " -f 1
Stephen Smalley75740f42013-10-30 14:28:30 -040032 echo ""
33done