-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·37 lines (27 loc) · 829 Bytes
/
Copy pathupdate.sh
File metadata and controls
executable file
·37 lines (27 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -e
silent=${1:-false}
# version
old_version="1.2.2"
new_version="1.2.2"
# go
old_go_version="1.26"
new_go_version="1.27"
echo "Version ${old_version} -> ${new_version}"
echo "go ${old_go_version} -> ${new_go_version}"
echo
if [[ $silent == false ]]; then
read -r -p "Press enter to continue"
fi
# main.go
find ./cmd/node-packager -maxdepth 1 -name main.go -type f -exec sed -i "s/${old_version}/${new_version}/g" {} \;
# .github/workflows/*.yml
find ./.github/workflows -maxdepth 1 -name "*.yml" -type f -exec sed -i "s/go-version: '${old_go_version}'/go-version: '${new_go_version}'/g" {} \;
# go.mod
find . -maxdepth 1 -name go.mod -type f -exec sed -i "s/go ${old_go_version}/go ${new_go_version}/g" {} \;
# update go deps
go get -u ./...
go mod vendor
go mod tidy
./build.sh
./vulncheck.sh