We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14d9229 commit 6db2659Copy full SHA for 6db2659
1 file changed
scripts/cargo-update-and-push.sh
@@ -0,0 +1,23 @@
1
+#!/bin/bash -eu
2
+# Runs `cargo update`, runs local tests, pushes w/ automerge on success.
3
+
4
+cd "$(dirname "$(readlink -m "$0")")/.."
5
6
+if [[ -n "$(git status --porcelain)" ]]; then
7
+ echo "There are uncommitted changes" >&2
8
+ exit 1
9
+fi
10
11
+cargo update
12
+cargo test
13
+git commit -a -m 'Run cargo-update'
14
+git checkout -B cargo-update
15
+git push --set-upstream github HEAD:cargo-update
16
17
+pr_url=$(gh pr create \
18
+ --title='Run cargo-update' \
19
+ --body='Autogenerated by cargo-update-and-push.sh.')
20
+echo "Posted update PR as ${pr_url}."
21
22
+gh pr merge "${pr_url}" --auto --delete-branch --squash
23
+echo "Set autosubmit."
0 commit comments