Iterate on the script
This commit is contained in:
parent
bc352ba9de
commit
26fb2ea238
2 changed files with 17 additions and 11 deletions
6
.github/workflows/recordScreenshots.yml
vendored
6
.github/workflows/recordScreenshots.yml
vendored
|
|
@ -2,11 +2,6 @@ name: Record screenshots
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
param_branch:
|
|
||||||
description: 'Branch to record the screenshots on'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
# Enrich gradle.properties for CI/CD
|
# Enrich gradle.properties for CI/CD
|
||||||
env:
|
env:
|
||||||
|
|
@ -32,4 +27,3 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
|
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
|
||||||
BRANCH: ${{ inputs.param_branch }}
|
|
||||||
|
|
|
||||||
22
.github/workflows/scripts/recordScreenshots.sh
vendored
22
.github/workflows/scripts/recordScreenshots.sh
vendored
|
|
@ -26,18 +26,30 @@ if [[ -z ${GITHUB_REPOSITORY} ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z ${BRANCH} ]]; then
|
if [[ -z ${GITHUB_REF_NAME} ]]; then
|
||||||
echo "Missing BRANCH variable"
|
echo "Missing GITHUB_REF_NAME variable"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./gradlew recordPaparazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn
|
|
||||||
|
|
||||||
git config user.name "ElementBot"
|
git config user.name "ElementBot"
|
||||||
git config user.email "benoitm+elementbot@element.io"
|
git config user.email "benoitm+elementbot@element.io"
|
||||||
|
|
||||||
|
echo "Git status"
|
||||||
|
git status
|
||||||
|
|
||||||
|
echo "Fetching..."
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout --track "origin/$BRANCH"
|
|
||||||
|
echo "Checkout origin/$GITHUB_REF_NAME"
|
||||||
|
git checkout "origin/$GITHUB_REF_NAME"
|
||||||
|
|
||||||
|
echo "Record screenshots"
|
||||||
|
./gradlew recordPaparazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn
|
||||||
|
|
||||||
|
echo "Committing changes"
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Update screenshots"
|
git commit -m "Update screenshots"
|
||||||
|
|
||||||
|
echo "Pushing changes"
|
||||||
git push "https://$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
|
git push "https://$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue