#!/bin/sh

set -e

newVersion=1.05
revision=UnitTestingFramework-v$newVersion

filesToWatch="procedures docu helper INSTALL.txt"

for i in `ls procedures/*.ipf`; do
	sed -i "s/#pragma version=.*/#pragma version=$newVersion/" $i
done

if [ ! -z "$(git status -s --untracked-files=no $filesToWatch)" ]; then
	echo "Aborting, please commit the changes first"
	exit 0
fi

basename=$revision
zipFile=$basename.zip
folder=releases/$basename

rm -rf $folder
rm -rf $zipfile

mkdir -p $folder

cp -r procedures docu/examples Readme.md helper $folder

# copy and rename manual
cp docu/refman.pdf $folder/Manual-$basename.pdf

# copy autorun script into example6 folder
cp $folder/helper/autorun-test.bat $folder/examples/Example6

git rev-parse $revision > internalVersion

cd releases && zip -m -z -q -r $basename.zip $basename/* < ../internalVersion && cd ..

rmdir $folder
rm internalVersion


#!/bin/sh

set -e

newVersion=1.05
revision=UnitTestingFramework-v$newVersion

filesToWatch="procedures docu helper INSTALL.txt"

for i in `ls procedures/*.ipf`; do
	sed -i "s/#pragma version=.*/#pragma version=$newVersion/" $i
done

if [ ! -z "$(git status -s --untracked-files=no $filesToWatch)" ]; then
	echo "Aborting, please commit the changes first"
	exit 0
fi

basename=$revision
zipFile=$basename.zip
folder=releases/$basename

rm -rf $folder
rm -rf $zipfile

mkdir -p $folder

cp -r procedures docu/examples Readme.md helper $folder

# copy and rename manual
cp docu/refman.pdf $folder/Manual-$basename.pdf

# copy autorun scripts into example6 folder
cp $folder/helper/autorun*.bat $folder/examples/Example6

git rev-parse $revision > internalVersion

cd releases && zip -m -z -q -r $basename.zip $basename/* < ../internalVersion && cd ..

rmdir $folder
rm internalVersion


Fix path to autostart scripts
create-release.sh: Fix path to autostart scripts

In 244d23cc (helper: Make it explicit that the autorun script is for IP6
only, 2017-02-14) and follow ups we changed the naming.
