Joshua Brindle | ff317eb | 2009-03-12 01:23:32 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 3 | DEST=../selinux-$(date '+%Y%m%d') |
Joshua Brindle | ff317eb | 2009-03-12 01:23:32 -0400 | [diff] [blame] | 4 | DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy sepolgen" |
| 5 | |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 6 | git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')" |
| 7 | |
Stephen Smalley | f64918f | 2013-10-31 14:23:26 -0400 | [diff] [blame] | 8 | rm -rf $DEST |
| 9 | mkdir -p $DEST |
Joshua Brindle | ff317eb | 2009-03-12 01:23:32 -0400 | [diff] [blame] | 10 | |
| 11 | for i in $DIRS; do |
| 12 | cd $i |
Stephen Smalley | f64918f | 2013-10-31 14:23:26 -0400 | [diff] [blame] | 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 |
Joshua Brindle | ff317eb | 2009-03-12 01:23:32 -0400 | [diff] [blame] | 17 | cd .. |
| 18 | done |
| 19 | |
Stephen Smalley | f64918f | 2013-10-31 14:23:26 -0400 | [diff] [blame] | 20 | cd $DEST |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 21 | |
Stephen Smalley | f64918f | 2013-10-31 14:23:26 -0400 | [diff] [blame] | 22 | echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:" |
| 23 | |
| 24 | echo "" |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 25 | |
Steve Lawrence | 51516db | 2014-08-27 11:32:34 -0400 | [diff] [blame] | 26 | echo "## Release $(date '+%Y-%m-%d')" |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 27 | |
| 28 | for i in *.tar.gz; do |
Steve Lawrence | 51516db | 2014-08-27 11:32:34 -0400 | [diff] [blame] | 29 | |
| 30 | echo -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) " |
Steve Lawrence | 5b9a172 | 2014-12-02 12:48:04 -0500 | [diff] [blame^] | 31 | sha256sum $i | cut -d " " -f 1 |
Stephen Smalley | 75740f4 | 2013-10-30 14:28:30 -0400 | [diff] [blame] | 32 | echo "" |
| 33 | done |