Fix screenshot screens for new source location
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
b7c0e94b3d
commit
797316b75a
|
@ -42,7 +42,7 @@ echo "</tr>"
|
|||
|
||||
#for image in ./build/reports/shot/verification/images/*.png ; do
|
||||
for image in $(/bin/ls -1 ./screenshots/gplay/debug/*.png | grep -v _dark_ | grep -v _light_) ; do
|
||||
cp $image build/screenshotSummary/images/
|
||||
cp $image app/build/screenshotSummary/images/
|
||||
|
||||
echo "<tr style='height:200px'>"
|
||||
echo "<td><a target='_blank' href=\"images/$(basename $image)\"><img width=100px src=\"images/$(basename $image)\"/></a></td>"
|
||||
|
@ -61,12 +61,12 @@ for image in $(/bin/ls -1 ./screenshots/gplay/debug/*.png | grep -v _dark_ | gre
|
|||
fi
|
||||
|
||||
# if image does not exist
|
||||
if [ ! -e ./build/reports/shot/verification/images/$name ]; then
|
||||
if [ ! -e ./app/build/reports/shot/verification/images/$name ]; then
|
||||
echo "<span style='color: red'>✘</span>"
|
||||
error=$((error + 1))
|
||||
elif [ -e ./build/reports/shot/verification/images/diff_$name ]; then
|
||||
elif [ -e ./app/build/reports/shot/verification/images/diff_$name ]; then
|
||||
# file with "diff_" prefix
|
||||
cp ./build/reports/shot/verification/images/diff_$name build/screenshotSummary/images/
|
||||
cp ./app/build/reports/shot/verification/images/diff_$name build/screenshotSummary/images/
|
||||
echo "<a target='_blank' href=\"images/diff_$name\"><img width=100px src=\"images/diff_$name\"/></a>"
|
||||
error=$((error + 1))
|
||||
else
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
## $3 classMethod: piped from androidScreenshotTest
|
||||
## $4 github event number
|
||||
|
||||
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g src/main/res/values/setup.xml
|
||||
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g app/src/main/res/values/setup.xml
|
||||
|
||||
if [[ $2 = "true" ]]; then
|
||||
record="-Precord"
|
||||
|
@ -48,6 +48,6 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g src/main/res/values/setup.xml
|
||||
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g app/src/main/res/values/setup.xml
|
||||
|
||||
exit $resultCode
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
mkdir -p build/screenshotSummary/images
|
||||
mkdir -p app/build/screenshotSummary/images
|
||||
|
||||
scripts/generateScreenshotOverview.sh > build/screenshotSummary/summary.html
|
||||
scripts/generateScreenshotOverview.sh > app/build/screenshotSummary/summary.html
|
||||
error=$?
|
||||
|
||||
scripts/uploadScreenshotSummary.sh $LOG_USERNAME $LOG_PASSWORD
|
||||
|
|
|
@ -66,9 +66,9 @@ for i in $(find ../../fastlane | grep png | grep Screenshots) ; do
|
|||
locale="-"$(echo $locale | cut -d"-" -f1)
|
||||
esac
|
||||
|
||||
if [ -e ../../src/main/res/values$locale/strings.xml ] ; then
|
||||
heading=$(grep $textID"_heading" ../../src/main/res/values$locale/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
subline=$(grep $textID"_subline" ../../src/main/res/values$locale/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
if [ -e ../../app/src/main/res/values$locale/strings.xml ] ; then
|
||||
heading=$(grep $textID"_heading" ../../app/src/main/res/values$locale/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
subline=$(grep $textID"_subline" ../../app/src/main/res/values$locale/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
else
|
||||
heading=""
|
||||
subline=""
|
||||
|
@ -76,11 +76,11 @@ for i in $(find ../../fastlane | grep png | grep Screenshots) ; do
|
|||
|
||||
# fallback to english if there is not translation
|
||||
if [ -z "$heading" ]; then
|
||||
heading=$(grep $textID"_heading" ../../src/main/res/values/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
heading=$(grep $textID"_heading" ../../app/src/main/res/values/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
fi
|
||||
|
||||
if [ -z "$subline" ]; then
|
||||
subline=$(grep $textID"_subline" ../../src/main/res/values/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
subline=$(grep $textID"_subline" ../../app/src/main/res/values/strings.xml | cut -d">" -f2 | cut -d"<" -f1 | sed s'#\&#\\&#')
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ adb shell "mount -o remount,rw /system"
|
|||
sleep 2
|
||||
adb shell "echo $IP server >> /system/etc/hosts"
|
||||
|
||||
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g src/main/res/values/setup.xml
|
||||
sed -i s'#<bool name="is_beta">false</bool>#<bool name="is_beta">true</bool>#'g app/src/main/res/values/setup.xml
|
||||
|
||||
## update/create all screenshots
|
||||
#./gradlew gplayDebugExecuteScreenshotTests -Precord \
|
||||
|
@ -100,7 +100,7 @@ resultCode=$?
|
|||
((retryCount++))
|
||||
done
|
||||
|
||||
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g src/main/res/values/setup.xml
|
||||
sed -i s'#<bool name="is_beta">true</bool>#<bool name="is_beta">false</bool>#'g app/src/main/res/values/setup.xml
|
||||
|
||||
if [ "$1" == "debug" ]; then
|
||||
exit
|
||||
|
|
Loading…
Reference in New Issue