aboutsummaryrefslogtreecommitdiff
path: root/auto-void-packages/commit-push-pr.sh
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2022-11-02 22:20:50 +0100
committerclyhtsuriva <aimeric@adjutor.xyz>2022-11-02 22:20:50 +0100
commit852a96b3cf69bb80773f926921c9d3f6b0101faf (patch)
tree05d6560368527f4a766511be02634eba74f708b3 /auto-void-packages/commit-push-pr.sh
parent0685ff941978dab274ff24e095de5c6a9e1931bb (diff)
Adding scripts to semi-automate void-packages updates
Diffstat (limited to 'auto-void-packages/commit-push-pr.sh')
-rwxr-xr-xauto-void-packages/commit-push-pr.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/auto-void-packages/commit-push-pr.sh b/auto-void-packages/commit-push-pr.sh
new file mode 100755
index 0000000..1352c73
--- /dev/null
+++ b/auto-void-packages/commit-push-pr.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+#Clyhtsuriva
+
+
+helpy(){
+printf "command: %s <package> <version> <tested>\n" "$0"
+printf "package: package name\n"
+printf "version: version update\n"
+printf "tested: yes/briefly/no\n"
+}
+
+
+[ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] && helpy && exit 1
+PKG="$1"
+VER="$2"
+TESTED="$3"
+printf "Updating %s to %s.\n" "$PKG" "$VER"
+
+pushd ~/workbench/void-packages || exit 1
+
+git add "srcpkgs/$PKG" && \
+ git commit -m "$PKG: update to $VER" && \
+ git push origin "$PKG-update"
+
+ARCHS=$(/bin/cat "$HOME/workbench/auto-void-packages/architectures.txt")
+
+gh pr create \
+ --title "$PKG: update to $VER" \
+ --body "#### Testing the changes
+- I tested the changes in this PR: **$TESTED**
+
+#### Local build testing
+- I built this PR locally for my native architecture, x86_64
+- I crossbuilded this PR locally for these architectures:
+$ARCHS" \
+ --base master \
+ --head "clyhtsuriva:$PKG-update"
+
+popd || exit 1