Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: download release tarball from named release #492

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions install-filcrypto
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,16 @@ download_release_tarball() {
local __rust_sources_path=$2
local __repo_name=$3
local __release_flags=$4
local __release_sha1=$(git rev-parse HEAD)
local __release_tag="${__release_sha1:0:16}"
local __release_tags=$(git tag --points-at "$(git rev-parse HEAD)")
local __release_tag=$(echo "${__release_tags}" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-\w+)?$' | head -n 1)

# If we're building from a commit that doesn't have a tag, we need to
# compile from source.
if [ -z "${__release_tag}" ]; then
(>&2 echo "[download_release_tarball] failed to determine release tag")
return 1
fi

local __release_tag_url="https://api.github.com/repos/filecoin-project/${__repo_name}/releases/tags/${__release_tag}"

# Download the non-optimized standard release.
Expand Down
Loading