release.sh 772 Bytes
Newer Older
Attila Lendvai's avatar
Attila Lendvai committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

VERSION=$1

ARCHIVE_NAME=iterate-"$VERSION".tar.gz
ARCHIVE_PATH="/project/iterate/public_html/releases"
ARCHIVE_FULLNAME="$ARCHIVE_PATH/$ARCHIVE_NAME"

if [ -e "$ARCHIVE_FULLNAME" ]; then
  echo "$ARCHIVE_FULLNAME already exists"
  exit -1
fi

Attila Lendvai's avatar
Attila Lendvai committed
14
15
echo "\nCreating release '$VERSION'\n\nDon't forget to tag the darcs repo!\nOutput will be $ARCHIVE_FULLNAME.\n\nPress enter to continue..."
read tmp
Attila Lendvai's avatar
Attila Lendvai committed
16
17
cd /project/iterate/darcs
cp -r iterate iterate-$VERSION
Attila Lendvai's avatar
Attila Lendvai committed
18
tar --exclude="iterate*/_darcs*" --exclude="iterate*/.*" --exclude="iterate*/bin" -zvcf "$ARCHIVE_FULLNAME" iterate-$VERSION
Attila Lendvai's avatar
Attila Lendvai committed
19
20
rm -rf iterate-$VERSION
cd "$ARCHIVE_PATH"
Attila Lendvai's avatar
Attila Lendvai committed
21
gpg --detach-sign --armor "$ARCHIVE_NAME"
Attila Lendvai's avatar
Attila Lendvai committed
22
23
ln -fs "$ARCHIVE_NAME" iterate-current.tar.gz
ln -fs "$ARCHIVE_NAME".asc iterate-current.tar.gz.asc