From 597b75cbe8301fb6e8aad6534580fccaff6e9f9f Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Tue, 15 Jun 2021 17:28:47 +0200 Subject: [PATCH] build in different folder --- .drone.yml | 2 +- pack-chrome.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3b60f14..f14568e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,6 +15,6 @@ steps: from_secret: gitea_token base_url: https://git.purser.it title: ${DRONE_TAG} - files: chrome.crx + files: proxy-stream-${DRONE_TAG}.crx when: event: tag diff --git a/pack-chrome.sh b/pack-chrome.sh index c10024b..cbe1589 100755 --- a/pack-chrome.sh +++ b/pack-chrome.sh @@ -3,6 +3,8 @@ dir=$(dirname $(realpath $0)) temp_name=$(head -c 20 /dev/random | xxd -p | tr -dc a-f0-9) temp_dir="/tmp/${temp_name}" chrome_dir="${temp_dir}/chrome" + +mkdir -p "${temp_dir}/out" mkdir -p "${chrome_dir}" if [[ "${CHROME_PRIVKEY}test" == "test" ]] @@ -34,6 +36,8 @@ then browser=$(which chromium 2> /dev/null) fi -${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${dir}/chrome" --pack-extension-key="${temp_dir}/privkey.pem" +cp "${dir}/chrome" "${temp_dir}/out/proxy-stream-${DRONE_TAG}" + +${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" rm -rf ${temp_dir}