Skip to content

Commit b185c92

Browse files
fix(ci): Fix demo-update command by sanitize env for asciinema upload
Change script that generates demo to cleanup envvars to avoid issue faced in the CI to upload the records.
1 parent 543f099 commit b185c92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hack/demo/generate-asciidemo.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ done
8383

8484
curl https://raw.githubusercontent.com/zechris/asciinema-rec_script/main/bin/asciinema-rec_script -o ${WKDIR}/asciinema-rec_script
8585
chmod +x ${WKDIR}/asciinema-rec_script
86-
screencast=${WKDIR}/${DEMO_NAME}.cast ${WKDIR}/asciinema-rec_script ${SCRIPTPATH}/${DEMO_SCRIPT}
86+
# Dynamically build clean env and eval the call
87+
ENV_EXPORTS=$(env | awk -F= '{ if ($2 ~ /^[^"]*$/) print "export " $1"=\"" $2 "\"" }')
88+
eval "${ENV_EXPORTS}
89+
screencast=${WKDIR}/${DEMO_NAME}.cast ${WKDIR}/asciinema-rec_script ${SCRIPTPATH}/${DEMO_SCRIPT}"
8790

8891
if [ -n "${UPLOAD-}" ]; then
8992
asciinema upload ${WKDIR}/${DEMO_NAME}.cast

0 commit comments

Comments
 (0)