Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Install oasis-build and oasis-cli from S3 build #95

Open
armaniferrante opened this issue Jul 17, 2019 · 1 comment
Open

Install oasis-build and oasis-cli from S3 build #95

armaniferrante opened this issue Jul 17, 2019 · 1 comment

Comments

@armaniferrante
Copy link
Contributor

Currently we cargo install in CI. It'd be faster to just grab the artifacts from s3.

@nhynes
Copy link
Contributor

nhynes commented Jul 17, 2019

oasis_build_tgz=$( \
	aws s3 ls s3://oasis-rs/ --recursive | \
    sort -t'-' -k1nr -k2nr -k3nr | \
	head -n 1 | \
	cut -d' ' -f7)

aws s3 cp s3://oasis-rs/$oasis_build_tgz - | \
    tar xz -C ~/.cargo/bin --strip-components=3 \
        oasis-build/oasis-build/bin/oasis-build

or, alternatively

oasis_build_tgz=$( \
    curl -sS http://oasis-rs.s3.amazonaws.com | \
    grep -Po '<Key>([a-zf0-9-_]+/x86_64-unknown-linux-gnu/oasis-build.tar.gz)<\/Key>' | \
    sed 's|</\?Key>||g' | \
    sed 's/.*\(2[0-9]\{3\}-[0-9]\{2\}-[0-9]\{2\}\).*/\1 \0/g' | \
    sort -t'-' -r | \
    cut -d' ' -f 2)

which doesn't depend on the output format of aws ls

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants