Merge branch 'revert-fabda262' into 'master'

Revert "Merge branch 'master' into 'master'"

This reverts merge request !1

Does not work on OS X:

```
fatal: could not create archive file '/lab03.1-23-g3452f1.tar.gz': Permission denied
mv: rename /1 to bin/1: Permission denied
mv: rename /Applications to bin/Applications: Permission denied
mv: rename /Library to bin/Library: Permission denied
mv: rename /Network to bin/Network: Permission denied
mv: rename /System to bin/System: Permission denied
mv: rename /Users to bin/Users: Permission denied
mv: rename /Volumes to bin/Volumes: Permission denied
mv: rename /bin to bin/bin: Permission denied
mv: rename /cores to bin/cores: Permission denied
mv: rename /dev to bin/dev: Permission denied
mv: rename /etc to bin/etc: Permission denied
mv: rename /home to bin/home: Permission denied
mv: rename /installer.failurerequests to bin/installer.failurerequests: Permission denied
mv: rename /net to bin/net: Permission denied
mv: rename /opt to bin/opt: Permission denied
mv: rename /private to bin/private: Permission denied
mv: rename /sbin to bin/sbin: Permission denied
mv: rename /tmp to bin/tmp: Permission denied
mv: rename /usr to bin/usr: Permission denied
mv: rename /var to bin/var: Permission denied
Projekti pakendamine 6nnestus
```

See merge request !2
This commit is contained in:
Silver Kits 2016-10-10 09:06:28 +00:00
commit 8ee4b59b24

View File

@ -1,51 +0,0 @@
#!/bin/bash
echo "Testi project buildi"
make clean && make
if [ $? -ne 0 ] ; then
echo "Build ei 6nnestunud!"
exit 1
else
echo "Build korras!"
fi
echo "Format code"
make format
# Test if there are changed files that are not commited
if [ -n "$(git status --porcelain)" ] ; then
echo "Uncommited files detected"
git status
exit 1
else
echo "OK"
fi
echo "Hetke tagid selles projektis"
git tag
echo -n "Are the required tags added? (Y/n)"
read ANSWER
if [ "$ANSWER" == "n" ]; then
echo "Palun lisa vajalikud tagid"
exit 1
fi
echo "Pakime projekti"
make clean && make
TEMP_DIR=$(mktemp -d)
cp bin/atmega2560-user-code.ihx $TEMP_DIR
make clean
git archive --format=tar.gz -o $TEMP_DIR/$(git describe --abbrev=6 --dirty --always --tags --long).tar.gz HEAD
mv $TEMP_DIR/* bin/
rm -rf $TEMP_DIR
echo "Projekti pakendamine 6nnestus"
exit 0