Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
kardolus
GitHub Repository: kardolus/chatgpt-cli
Path: blob/main/scripts/updatedeps.sh
2649 views
1
#!/usr/bin/env bash
2
set -o pipefail
3
4
echo "Checking for unstaged changes..."
5
if ! git diff --exit-code > /dev/null; then
6
echo "Error: You have unstaged changes. Please commit or stash them before running the tests."
7
exit 1
8
fi
9
10
go get -u ./...
11
go mod vendor
12
go mod tidy
13
14
if [[ `git status --porcelain` ]]; then
15
echo "Updated dependencies"
16
git add .
17
git ci -m "chore: bump dependencies"
18
git push
19
else
20
echo "Dependencies up to date"
21
fi
22
23