Skip to content

Commit

Permalink
fix upload
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris committed Nov 2, 2023
1 parent 65a2273 commit c3986a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/website/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func buildWebsite() {
if err != nil {
log.Fatal(err)
}
fmt.Println(months)
fmt.Println("Months:", months)

// build root page
log.Infof("Building root page ...")
Expand Down Expand Up @@ -185,7 +185,7 @@ func buildWebsite() {

for _, file := range toUpload {
app := "./scripts/s3/upload-file-to-r2.sh"
cmd := exec.Command(app, file.from, strings.TrimPrefix(file.to, "/")) //nolint:gosec
cmd := exec.Command(app, file.from, file.to) //nolint:gosec
stdout, err := cmd.Output()
if err != nil {
log.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions scripts/s3/upload-file-to-r2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fi
# auto-fill target if not given
if [ -z "$target" ]; then
# remove "/mnt/data/mempool-dumpster/" prefix from src and make it the S3 prefix
target="ethereum/mainnet/${src#"/mnt/data/mempool-dumpster/"}"
target="/ethereum/mainnet/${src#"/mnt/data/mempool-dumpster/"}"
fi

echo "uploading $src to S3 $target ..."
aws s3 cp $src s3://flashbots-mempool-dumpster/$target --endpoint-url "https://${CLOUDFLARE_R2_ACCOUNT_ID}.r2.cloudflarestorage.com"
aws s3 cp $src s3://flashbots-mempool-dumpster$target --endpoint-url "https://${CLOUDFLARE_R2_ACCOUNT_ID}.r2.cloudflarestorage.com"

0 comments on commit c3986a7

Please sign in to comment.