-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify-code.sh
More file actions
executable file
·18 lines (14 loc) · 1.04 KB
/
modify-code.sh
File metadata and controls
executable file
·18 lines (14 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Allows --force flag to actually force
sed -i -e 's/if !opt.ForceAll {/if !opt.ForceAll \&\& !opt.Force {/g' ./cmd/metadb/dsync/endsync.go
sed -i -e 's/if opt.ForceAll {/if opt.ForceAll || opt.Force {/g' ./cmd/metadb/dsync/sync.go
# Allows derived table git repo to be customized via ENV variable.
sed -i -e 's/url :\= \"https:\/\/github.com\/folio-org\/folio-analytics.git\"/url :\= os.Getenv("DERIVED_TABLES_GIT_REPO")/g' ./cmd/metadb/server/server.go
sed -i -e 's/ref, err \= cat.GetConfig(\"external_sql_folio\")/ref \= os.Getenv("DERIVED_TABLES_GIT_REFS")/g' ./cmd/metadb/server/server.go
# Removes manual prompt from endsync process
sed -i -e 's/if !opt.Force \&\& !opt.ForceAll {/if true == false {/g' ./cmd/metadb/dsync/endsync.go
# Update dependencies to address CVE-2025-58187, CVE-2025-58188, CVE-2025-22869, CVE-2025-22870, CVE-2025-22872, GHSA-2x5j-vhc8-9cwm, CVE-2025-47914, CVE-2025-58181
go env -w GOTOOLCHAIN=go1.24.9+auto
go get golang.org/x/crypto@v0.45.0
go get golang.org/x/net@v0.38.0
go get github.com/cloudflare/circl@v1.6.1