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}