[2.0.x] Debug Travis tests and scripts (#11704)
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
[ -z "$1" ] || cd $1
|
||||
|
||||
if [ -d .test ]; then
|
||||
if [ -d ".test" ]; then
|
||||
printf "\033[0;31mEnvironment backup already exists!\033[0m\n"
|
||||
else
|
||||
mkdir .test
|
||||
cp -r Marlin/src/pins .test/pins
|
||||
cp Marlin/Configuration*.h .test/
|
||||
[ -f Marlin/_Bootscreen.h ] && cp Marlin/_Bootscreen.h .test/
|
||||
[ -f Marlin/_Statusscreen.h ] && cp Marlin/_Statusscreen.h .test/
|
||||
cp -r Marlin/src/pins .test/pins
|
||||
printf "\033[0;32mEnvironment Backup created\033[0m\n"
|
||||
fi
|
||||
|
@@ -2,10 +2,25 @@
|
||||
|
||||
[ -z "$1" ] || cd $1
|
||||
|
||||
cp Marlin/src/config/default/* Marlin/
|
||||
[ -f Marlin/_Bootscreen.h ] && rm Marlin/_Bootscreen.h
|
||||
[ -f Marlin/_Statusscreen.h ] && rm Marlin/_Statusscreen.h
|
||||
[ -d .test/pins ] && { cp .test/pins/* Marlin/src/pins/ ; rm -rf .test/pins ; }
|
||||
[ -d .test ] && rm -r .test
|
||||
if [ -d ".test" ]; then
|
||||
cp .test/Configuration*.h Marlin/
|
||||
rm .test/Configuration*.h
|
||||
|
||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
||||
if [ -f .test/_Bootscreen.h ]; then
|
||||
cp .test/_Bootscreen.h Marlin/
|
||||
rm .test/_Bootscreen.h
|
||||
fi
|
||||
|
||||
if [ -f .test/_Statusscreen.h ]; then
|
||||
cp .test/_Statusscreen.h Marlin/
|
||||
rm .test/_Statusscreen.h
|
||||
fi
|
||||
|
||||
cp -r .test/pins Marlin/src
|
||||
rm -r .test/pins
|
||||
|
||||
rmdir .test
|
||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
||||
else
|
||||
printf "\033[0;31mEnvironment Backup not available!\033[0m\n"
|
||||
fi
|
||||
|
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# generate_version_header_for_marlin
|
||||
#
|
||||
# generate_version
|
||||
#
|
||||
# Make a _Version.h file
|
||||
#
|
||||
|
||||
DIR="${1}"
|
||||
|
||||
@@ -9,13 +13,8 @@ DISTDATE=$(date '+%Y-%m-%d %H:%M')
|
||||
BRANCH=$(git -C "${DIR}" symbolic-ref -q --short HEAD)
|
||||
VERSION=$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null)
|
||||
|
||||
if [ -z "${BRANCH}" ]; then
|
||||
BRANCH=$(echo "${TRAVIS_BRANCH}")
|
||||
fi
|
||||
|
||||
if [ -z "${VERSION}" ]; then
|
||||
VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null)
|
||||
fi
|
||||
[ -z "${BRANCH}" ] && BRANCH=$(echo "${TRAVIS_BRANCH}")
|
||||
[ -z "${VERSION}" ] && VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null)
|
||||
|
||||
SHORT_BUILD_VERSION=$(echo "${BRANCH}")
|
||||
DETAILED_BUILD_VERSION=$(echo "${BRANCH}-${VERSION}")
|
@@ -1,15 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# restore_configs
|
||||
#
|
||||
# Restore default configs, delete pins backup and dogm bitmaps
|
||||
#
|
||||
|
||||
# Restore the (possibly modified) Configurations
|
||||
[ -d ".test" -a -f ".test/Configuration.h" ] && cp .test/Configuration*.h Marlin/
|
||||
cp Marlin/src/config/default/Configuration*.h Marlin
|
||||
|
||||
# Restore the original unmodified pins
|
||||
[ -d ".test/pins" ] && cp -r .test/pins Marlin/src/pins/
|
||||
[ -f Marlin/src/pins/pins_RAMPS.h.backup ] && cp Marlin/src/pins/pins_RAMPS.h.backup Marlin/src/pins/pins_RAMPS.h
|
||||
rm -f Marlin/src/pins/pins_RAMPS.h.backup
|
||||
|
||||
# Delete DOGM bitmaps
|
||||
rm -f Marlin/_*screen.h
|
||||
rm -f Marlin/_Bootscreen.h
|
||||
rm -f Marlin/_Statusscreen.h
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cp Marlin/Configuration*.h .test/
|
||||
cp Marlin/Configuration*.h Marlin/src/config/default
|
||||
|
Reference in New Issue
Block a user