devops: fix firefox archiving scripts (#10101)
They should use absolute paths instead of relative paths.
This commit is contained in:
parent
8bf8f49746
commit
9f4b0235eb
|
|
@ -33,27 +33,29 @@ cd "$(dirname "$0")"
|
||||||
SCRIPT_FOLDER="$(pwd -P)"
|
SCRIPT_FOLDER="$(pwd -P)"
|
||||||
source "${SCRIPT_FOLDER}/../utils.sh"
|
source "${SCRIPT_FOLDER}/../utils.sh"
|
||||||
|
|
||||||
if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; then
|
if [[ -z "${FF_CHECKOUT_PATH}" ]]; then
|
||||||
cd "${FF_CHECKOUT_PATH}"
|
FF_CHECKOUT_PATH="$HOME/firefox"
|
||||||
echo "WARNING: checkout path from FF_CHECKOUT_PATH env: ${FF_CHECKOUT_PATH}"
|
|
||||||
else
|
|
||||||
cd "$HOME/firefox"
|
|
||||||
fi
|
fi
|
||||||
|
OBJ_FOLDER="${FF_CHECKOUT_PATH}/obj-build-playwright"
|
||||||
|
|
||||||
OBJ_FOLDER="obj-build-playwright"
|
cd "${FF_CHECKOUT_PATH}"
|
||||||
|
|
||||||
./mach package
|
if [[ "$2" == "--linux-arm64" ]]; then
|
||||||
node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/$OBJ_FOLDER/dist/firefox
|
CMD_STRIP=/usr/bin/aarch64-linux-gnu-strip ./mach package
|
||||||
|
else
|
||||||
|
./mach package
|
||||||
|
fi
|
||||||
|
node "${SCRIPT_FOLDER}/install-preferences.js" "${OBJ_FOLDER}/dist/firefox"
|
||||||
|
|
||||||
if ! [[ -d $OBJ_FOLDER/dist/firefox ]]; then
|
if ! [[ -d "$OBJ_FOLDER/dist/firefox" ]]; then
|
||||||
echo "ERROR: cannot find $OBJ_FOLDER/dist/firefox folder in the checkout/. Did you build?"
|
echo "ERROR: cannot find $OBJ_FOLDER/dist/firefox folder in the firefox checkout. Did you build?"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy the libstdc++ version we linked against.
|
# Copy the libstdc++ version we linked against.
|
||||||
# TODO(aslushnikov): this won't be needed with official builds.
|
# TODO(aslushnikov): this won't be needed with official builds.
|
||||||
if [[ "$(uname)" == "Linux" ]]; then
|
if [[ "$(uname)" == "Linux" ]]; then
|
||||||
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $OBJ_FOLDER/dist/firefox/libstdc++.so.6
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* ]]; then
|
||||||
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
||||||
cd "$(printMSVCRedistDir)"
|
cd "$(printMSVCRedistDir)"
|
||||||
|
|
@ -61,5 +63,5 @@ elif [[ "$(uname)" == MINGW* ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tar resulting directory and cleanup TMP.
|
# tar resulting directory and cleanup TMP.
|
||||||
cd $OBJ_FOLDER/dist
|
cd "${OBJ_FOLDER}/dist"
|
||||||
zip -r "$ZIP_PATH" firefox
|
zip -r "$ZIP_PATH" firefox
|
||||||
|
|
|
||||||
|
|
@ -33,23 +33,21 @@ cd "$(dirname "$0")"
|
||||||
SCRIPT_FOLDER="$(pwd -P)"
|
SCRIPT_FOLDER="$(pwd -P)"
|
||||||
source "${SCRIPT_FOLDER}/../utils.sh"
|
source "${SCRIPT_FOLDER}/../utils.sh"
|
||||||
|
|
||||||
if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; then
|
if [[ -z "${FF_CHECKOUT_PATH}" ]]; then
|
||||||
cd "${FF_CHECKOUT_PATH}"
|
FF_CHECKOUT_PATH="$HOME/firefox"
|
||||||
echo "WARNING: checkout path from FF_CHECKOUT_PATH env: ${FF_CHECKOUT_PATH}"
|
|
||||||
else
|
|
||||||
cd "$HOME/firefox"
|
|
||||||
fi
|
fi
|
||||||
|
OBJ_FOLDER="${FF_CHECKOUT_PATH}/obj-build-playwright"
|
||||||
|
|
||||||
OBJ_FOLDER="obj-build-playwright"
|
cd "${FF_CHECKOUT_PATH}"
|
||||||
|
|
||||||
if [[ "$2" == "--linux-arm64" ]]; then
|
if [[ "$2" == "--linux-arm64" ]]; then
|
||||||
CMD_STRIP=/usr/bin/aarch64-linux-gnu-strip ./mach package
|
CMD_STRIP=/usr/bin/aarch64-linux-gnu-strip ./mach package
|
||||||
else
|
else
|
||||||
./mach package
|
./mach package
|
||||||
fi
|
fi
|
||||||
node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/$OBJ_FOLDER/dist/firefox
|
node "${SCRIPT_FOLDER}/install-preferences.js" "${OBJ_FOLDER}/dist/firefox"
|
||||||
|
|
||||||
if ! [[ -d $OBJ_FOLDER/dist/firefox ]]; then
|
if ! [[ -d "$OBJ_FOLDER/dist/firefox" ]]; then
|
||||||
echo "ERROR: cannot find $OBJ_FOLDER/dist/firefox folder in the firefox checkout. Did you build?"
|
echo "ERROR: cannot find $OBJ_FOLDER/dist/firefox folder in the firefox checkout. Did you build?"
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
@ -57,7 +55,7 @@ fi
|
||||||
# Copy the libstdc++ version we linked against.
|
# Copy the libstdc++ version we linked against.
|
||||||
# TODO(aslushnikov): this won't be needed with official builds.
|
# TODO(aslushnikov): this won't be needed with official builds.
|
||||||
if [[ "$(uname)" == "Linux" ]]; then
|
if [[ "$(uname)" == "Linux" ]]; then
|
||||||
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $OBJ_FOLDER/dist/firefox/libstdc++.so.6
|
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"
|
||||||
elif [[ "$(uname)" == MINGW* ]]; then
|
elif [[ "$(uname)" == MINGW* ]]; then
|
||||||
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974
|
||||||
cd "$(printMSVCRedistDir)"
|
cd "$(printMSVCRedistDir)"
|
||||||
|
|
@ -65,5 +63,5 @@ elif [[ "$(uname)" == MINGW* ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# tar resulting directory and cleanup TMP.
|
# tar resulting directory and cleanup TMP.
|
||||||
cd $OBJ_FOLDER/dist
|
cd "${OBJ_FOLDER}/dist"
|
||||||
zip -r "$ZIP_PATH" firefox
|
zip -r "$ZIP_PATH" firefox
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue