Navigation Menu

Skip to content

Commit

Permalink
Add make-update script and fix release script.
Browse files Browse the repository at this point in the history
make-update script is for generating an update for an existing release,
e.g. for a bug fix update.

release script is for generating a new release.

Per-package tagging may fail on the release script if the version
has not changed; this is harmless.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
  • Loading branch information
stephensmalley committed Oct 31, 2013
1 parent ac74dde commit f64918f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
36 changes: 36 additions & 0 deletions scripts/make-update
@@ -0,0 +1,36 @@
#!/bin/bash

if [ $# != 2 ]; then
echo "Usage: $0 last-release-date package-to-update"
echo " e.g. $0 20131030 sepolgen"
exit 1
fi

TAG=$1
PKG=$2

DEST=../update-$TAG
mkdir -p $DEST

if [ \! -d $PKG ]; then
echo "$PKG does not exist."
exit 1
fi

cd $PKG
VERS=`cat VERSION`
ARCHIVE=$PKG-$VERS.tar.gz
git tag $PKG-$VERS
git archive --format=tar --prefix=$PKG-$VERS/ $PKG-$VERS | gzip > ../$DEST/$ARCHIVE
cd ..

cd $DEST

echo "Copy $ARCHIVE from $DEST to the server and update its download link and checksum on the Releases wiki page:"

echo ""

echo "[http://userspace.selinuxproject.org/releases/$TAG/$ARCHIVE $ARCHIVE]"
echo ""
echo "`sha256sum $ARCHIVE`"
echo ""
17 changes: 10 additions & 7 deletions scripts/release
Expand Up @@ -5,18 +5,23 @@ DIRS="libsepol libselinux libsemanage policycoreutils checkpolicy sepolgen"

git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"

rm -rf $(DEST)
mkdir -p $(DEST)
rm -rf $DEST
mkdir -p $DEST

for i in $DIRS; do
cd $i
git archive --format=tar --prefix=$i-`cat VERSION`/ HEAD | gzip > ../$(DEST)/$i-`cat VERSION`.tar.gz
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

pushd $(DEST)
cd $DEST

echo "Copy contents of $(DEST) to the server and add the following to the Releases wiki page:"
echo "Copy *.tar.gz from $DEST to the server and add the following to the Releases wiki page:"

echo ""

echo "== Release $(date '+%Y-%m-%d') =="

Expand All @@ -26,5 +31,3 @@ for i in *.tar.gz; do
echo "`sha256sum $i`"
echo ""
done

popd

0 comments on commit f64918f

Please sign in to comment.