Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions Dockerfile-rust
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ RUN rustup toolchain install ${RUST_TOOLCHAIN} \
&& useradd -ms /bin/bash fastly

USER fastly
# this forces the download of the crates index; it will save build time if the image was recently built
RUN cargo search --limit 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated to the PR itself but was needed as crates.io now returns a 500 Internal Server Error for this call (I'm able to replicate locally). I've pinged our Rust experts internally about whether something changed on the Crates end of things, but as it's a performance operation and doesn't directly affect functionality I decided the best thing to do is to just remove the line.


WORKDIR /app
ENTRYPOINT ["/usr/bin/fastly"]
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func (m Metadata) URL() string {
// NOTE: We use `m.repo` for wasm-tools instead of `m.binary`.
// This is because we append `.exe` to `m.binary` on Windows.
// Instead of filtering the extension we just use `m.repo` instead.
pattern := fmt.Sprintf("https://github.com/%s/%s/releases/download/%s-%s/%s-%s-%s-%s.%s", m.org, m.repo, m.repo, version, m.repo, version, arch, platform, extension)
pattern := fmt.Sprintf("https://github.com/%s/%s/releases/download/v%s/%s-%s-%s-%s.%s", m.org, m.repo, version, m.repo, version, arch, platform, extension)
if matched, _ := regexp.MatchString(pattern, a.BrowserDownloadURL); matched {
return a.BrowserDownloadURL
}
Expand Down