No scripts
parent
d31684eec7
commit
e5f57d5df5
|
@ -1,57 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# Fail on first error
|
||||
set -e
|
||||
|
||||
echo "***************************************************************"
|
||||
echo "Abgabe einreichen"
|
||||
echo "***************************************************************"
|
||||
echo ""
|
||||
cd sources
|
||||
|
||||
# Test, if project builds
|
||||
echo "------------------------------------------------------------------"
|
||||
echo "Build..."
|
||||
echo ""
|
||||
if ! mvn; then
|
||||
echo -e "\e[31m"
|
||||
echo "💣 Projekt baut nicht und kann deswegen nicht abgegeben werden."
|
||||
echo "💣 Bitte beheben Sie alle gemeldeten Fehler und versuchen Sie "
|
||||
echo "💣 es dann erneut "
|
||||
echo -e "\e[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[32m"
|
||||
echo "✅ Projekt gebaut "
|
||||
echo -e "\e[0m"
|
||||
fi
|
||||
|
||||
# Test, if all changes are committed
|
||||
echo "------------------------------------------------------------------"
|
||||
echo "Teste git-Staus..."
|
||||
if ! git status | grep -q "nothing to commit, working tree clean"; then
|
||||
echo -e "\e[31m"
|
||||
echo "💣 Bitte checken Sie alle Änderungen per git ein. "
|
||||
echo -e "\e[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[32m"
|
||||
echo "✅ Alle Dateien eingecheckt "
|
||||
echo -e "\e[0m"
|
||||
|
||||
fi
|
||||
|
||||
# Submit
|
||||
echo "------------------------------------------------------------------"
|
||||
echo "Sende Lösung..."
|
||||
if ! git push origin master; then
|
||||
echo -e "\e[31m"
|
||||
echo "💣 Push nicht erfolgreich. Bitte beheben Sie den Fehler und "
|
||||
echo "💣 starten Sie das Skript erneut. "
|
||||
echo -e "\e[0m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[32m"
|
||||
echo "✅ Aktuelle Lösungen eingereicht "
|
||||
echo -e "\e[0m"
|
||||
fi
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# Fail on first error
|
||||
set -e
|
||||
|
||||
# Clone repo if not already present
|
||||
if [ ! -d ".assignments" ]; then
|
||||
git clone gitea@gitty.informatik.hs-mannheim.de:pr2-lecture/assignments.git .assignments
|
||||
mkdir -p sources/src/main/java
|
||||
fi
|
||||
|
||||
# Sync exercises with local directory
|
||||
echo "---------------------------------------------------------------"
|
||||
echo "Hole neue Aufgaben und Quelltexte "
|
||||
echo "---------------------------------------------------------------"
|
||||
(cd .assignments && git pull origin master)
|
||||
rsync --ignore-existing -raz .assignments/sources/ sources/
|
||||
|
||||
for dir in .assignments/Assignment_*; do
|
||||
rsync --ignore-existing -raz "$dir" ./
|
||||
done
|
||||
|
||||
# Assignment files
|
||||
rsync --ignore-existing -raz --include='Assignment_*' --exclude='*' .assignments/* ./
|
||||
|
||||
# Libraries
|
||||
rsync -raz .assignments/sources/lib/ ./sources/lib
|
||||
|
||||
cp .assignments/readme.md README.md
|
||||
|
||||
# Update the scripts
|
||||
cp -R .assignments/bin ./
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>pr2</name>
|
||||
<comment>Vorlage für PR2</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1675099241341</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
Loading…
Reference in New Issue