mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-11-16 06:05:00 -05:00
Add release script
This commit is contained in:
parent
502f8924c3
commit
29461ae049
46
release.sh
Executable file
46
release.sh
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PREFIX=gcn64usb
|
||||||
|
HEXFILE=$PREFIX.hex
|
||||||
|
|
||||||
|
echo "Release script for $PREFIX"
|
||||||
|
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
echo "Syntax: ./release.sh version releasedir"
|
||||||
|
echo
|
||||||
|
echo "ex: './release 1.0' will produce $PREFIX-1.0.tar.gz in releasedir out of git HEAD,"
|
||||||
|
exit "untar it, build the firmware and create $PREFIX-1.0.hex in releasedir."
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
RELEASEDIR=$2
|
||||||
|
DIRNAME=$PREFIX-$VERSION
|
||||||
|
FILENAME=$PREFIX-$VERSION.tar.gz
|
||||||
|
TAG=v$VERSION
|
||||||
|
|
||||||
|
echo "Version: $VERSION"
|
||||||
|
echo "Filename: $FILENAME"
|
||||||
|
echo "Release directory: $RELEASEDIR"
|
||||||
|
echo "--------"
|
||||||
|
echo "Ready? Press ENTER to go ahead (or CTRL+C to cancel)"
|
||||||
|
|
||||||
|
read
|
||||||
|
|
||||||
|
if [ -f $RELEASEDIR/$FILENAME ]; then
|
||||||
|
echo "Release file already exists!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git tag $TAG -f
|
||||||
|
git archive --format=tar --prefix=$DIRNAME/ HEAD | gzip > $RELEASEDIR/$FILENAME
|
||||||
|
|
||||||
|
cd $RELEASEDIR
|
||||||
|
tar zxf $FILENAME
|
||||||
|
cd $DIRNAME
|
||||||
|
make
|
||||||
|
cp $HEXFILE ../$PREFIX-$VERSION.hex
|
||||||
|
cd ..
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
ls -l $PREFIX-$VERSION.*
|
Loading…
Reference in New Issue
Block a user