-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
for Finch on Windows #492, we need to provide a rootfs to WSL2. This rootfs lives in our dependencies bucket, and will be updated from time-to-time for security patches, bug fixes, etc. This commit will automatically pull the most recent rootfs from the depenedencies bucket as part of the Update Deps action. Signed-off-by: Gavin Inglis <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
set -euxo pipefail | ||
|
||
DEPENDENCY_CLOUDFRONT_URL="https://deps.runfinch.com/" | ||
AARCH64_FILENAME_PATTERN="finch-rootfs-production-arm64-[0-9].*\.tar.zst$" | ||
AMD64_FILENAME_PATTERN="finch-rootfs-production-amd64-[0-9].*\.tar.zst$" | ||
|
||
while getopts d: flag | ||
do | ||
case "${flag}" in | ||
d) dependency_bucket=${OPTARG};; | ||
esac | ||
done | ||
|
||
[[ -z "$dependency_bucket" ]] && { echo "Error: Dependency bucket not set"; exit 1; } | ||
|
||
aarch64Deps=$(aws s3 ls s3://${dependency_bucket}/ | grep "$AARCH64_FILENAME_PATTERN" | sort | tail -n 1 | awk '{print $4}') | ||
|
||
[[ -z "$aarch64Deps" ]] && { echo "Error: aarch64 dependency not found"; exit 1; } | ||
|
||
amd64Deps=$(aws s3 ls s3://${dependency_bucket}/ | grep "$AMD64_FILENAME_PATTERN" | sort | tail -n 1 | awk '{print $4}') | ||
|
||
[[ -z "$amd64Deps" ]] && { echo "Error: x86_64 dependency not found"; exit 1; } | ||
|
||
sed -E -i.bak 's|^([[:blank:]]*FINCH_ROOTFS_URL[[:blank:]]*\?=[[:blank:]]*'${DEPENDENCY_CLOUDFRONT_URL}')('${AARCH64_FILENAME_PATTERN}')|\1'$aarch64Deps'|' Makefile | ||
sed -E -i.bak 's|^([[:blank:]]*FINCH_ROOTFS_URL[[:blank:]]*\?=[[:blank:]]*'${DEPENDENCY_CLOUDFRONT_URL}')('${AMD64_FILENAME_PATTERN}')|\1'$amd64Deps'|' Makefile |
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