This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate collection of serverless chrome (#40)
- Loading branch information
1 parent
17cc7a8
commit eb160d7
Showing
5 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -x | ||
|
||
if ! type -p jq &>/dev/null; then | ||
echo "Could not find dependency 'jq'. Aborting." | ||
exit 1 | ||
fi | ||
|
||
if [ -z $SERVERLESS_CHROME_VERSION ] | ||
then | ||
SERVERLESS_CHROME_VERSION=v1.0.0-55 | ||
fi | ||
|
||
if [ $OUTPUT_DIR ] | ||
then | ||
cd $OUTPUT_DIR | ||
fi | ||
|
||
DOWNLOAD_URL=`curl --silent https://api.github.com/repos/adieuadieu/serverless-chrome/releases/tags/${SERVERLESS_CHROME_VERSION} | jq -r '.assets[] | select(.name | startswith("stable")) | .browser_download_url'` | ||
echo "Downloading from URL: ${DOWLOAD_URL}" | ||
curl -L $DOWNLOAD_URL --output serverless_chromium.zip | ||
|
||
unzip serverless_chromium.zip | ||
|
||
tar -cvzf HeadlessChromium-${SERVERLESS_CHROME_VERSION}.tar.gz headless-chromium | ||
rm headless-chromium serverless_chromium.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters