fix local build
This commit is contained in:
parent
21c4c64cde
commit
e8d4f1f329
@ -9,7 +9,8 @@ then
|
||||
export DRONE_TAG=$(git describe --abbrev=0 | tr -dc v0-9)
|
||||
fi
|
||||
|
||||
rm "${dir}/out"
|
||||
mkdir -p "${dir}/out"
|
||||
rm -rf "${dir}/out"
|
||||
|
||||
mkdir -p "${temp_dir}/out"
|
||||
mkdir -p "${chrome_dir}"
|
||||
@ -29,7 +30,7 @@ then
|
||||
dbus-daemon --session --address="${DBUS_SESSION_BUS_ADDRESS}" &
|
||||
fi
|
||||
|
||||
if [[ "${DISPLAY}test" == "test" ]]
|
||||
if [[ ! -n "${DISPLAY}" ]]
|
||||
then
|
||||
export DISPLAY=:8819
|
||||
Xvfb "${DISPLAY}" &
|
||||
@ -46,7 +47,12 @@ fi
|
||||
release_folder="${temp_dir}/out/proxy-stream-${DRONE_TAG}"
|
||||
cp -r "${dir}/chrome" "${release_folder}"
|
||||
|
||||
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"
|
||||
if grep "/proc/1/cgroup" -q -F -e docker
|
||||
then
|
||||
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"
|
||||
else
|
||||
${browser} --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"
|
||||
fi
|
||||
|
||||
rm -rf "${release_folder}"
|
||||
mv "${temp_dir}/out" "${dir}/out"
|
||||
|
Loading…
Reference in New Issue
Block a user