mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-16 21:30:31 +02:00
Improved Release Prep Script
This commit is contained in:
@@ -2,7 +2,7 @@ printLine(){
|
|||||||
echo "$2$1 \033[0m"
|
echo "$2$1 \033[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
resetGit(){
|
gitReset(){
|
||||||
printLine "This will discard all your uncommited changes and restore the last commit. Continue?" "\033[0;33m"
|
printLine "This will discard all your uncommited changes and restore the last commit. Continue?" "\033[0;33m"
|
||||||
read
|
read
|
||||||
git reset --hard
|
git reset --hard
|
||||||
@@ -11,14 +11,14 @@ resetGit(){
|
|||||||
|
|
||||||
runCPPCheck(){
|
runCPPCheck(){
|
||||||
printLine "Running CPPCheck..."
|
printLine "Running CPPCheck..."
|
||||||
cppcheck --enable=all --output-file=cppcheck_errors.txt src/
|
cppcheck -q --enable=all --output-file=cppcheck_errors.txt src/ || { printLine "ERROR: cppcheck not found!" "\033[0;33m"; return; }
|
||||||
cppcheck --check-config --output-file=cppcheck_config.txt src/
|
cppcheck -q --check-config --output-file=cppcheck_config.txt src/ || { printLine "ERROR: cppcheck not found!" "\033[0;33m"; return; }
|
||||||
printLine "CPPCheck finished" "\033[0;32m"
|
printLine "CPPCheck finished" "\033[0;32m"
|
||||||
}
|
}
|
||||||
|
|
||||||
runUncrustify(){
|
runUncrustify(){
|
||||||
printLine "Running Uncrustify..."
|
printLine "Running Uncrustify..."
|
||||||
find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -exec uncrustify -c conf/uncrustify.cfg --no-backup {} +
|
find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -exec uncrustify -q -c conf/uncrustify.cfg --no-backup {} + || { printLine "ERROR: uncrusify not found!" "\033[0;33m"; return; }
|
||||||
printLine "Uncrustify finished." "\033[0;32m"
|
printLine "Uncrustify finished." "\033[0;32m"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,25 +33,35 @@ cleanDir(){
|
|||||||
|
|
||||||
runDoxygen(){
|
runDoxygen(){
|
||||||
printLine "Running Doxygen..."
|
printLine "Running Doxygen..."
|
||||||
doxygen conf/intelliphoto_dox
|
doxygen conf/intelliphoto_dox || { printLine "ERROR: doxygen not found!" "\033[0;33m"; return; }
|
||||||
printLine "Doxygen finished." "\033[0;32m"
|
printLine "Doxygen finished." "\033[0;32m"
|
||||||
}
|
}
|
||||||
|
|
||||||
gitCommit(){
|
gitCommit(){
|
||||||
printLine "Committing Changes to Git..."
|
printLine "Committing Changes to Git..."
|
||||||
git add '*'
|
git add '*' || { printLine "ERROR: git not found!" "\033[0;33m"; return; }
|
||||||
git commit -m "Automated Release Preparation"
|
git commit -m "Automated Release Preparation"
|
||||||
printLine "Committed." "\033[0;32m"
|
printLine "Committed." "\033[0;32m"
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareMerge(){
|
prepareMerge(){
|
||||||
printLine "Merge Preparation started..."
|
printLine "Merge Preparation started..."
|
||||||
|
runUncrustify
|
||||||
|
runCPPCheck
|
||||||
|
runDoxygen
|
||||||
|
gitCommit
|
||||||
printLine "Finished." "\033[0;32m"
|
printLine "Finished." "\033[0;32m"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareRelease(){
|
prepareRelease(){
|
||||||
printLine "Release Preparation started..."
|
printLine "Release Preparation started..."
|
||||||
|
gitReset
|
||||||
|
cleanDir
|
||||||
|
runUncrustify
|
||||||
|
runCPPCheck
|
||||||
|
runDoxygen
|
||||||
|
gitCommit
|
||||||
printLine "Finished." "\033[0;32m"
|
printLine "Finished." "\033[0;32m"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user