summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvsibille2022-06-28 11:40:06 -0500
committervsibille2022-06-28 11:40:06 -0500
commit8f4d81f5060558864829296ae22f5f96d12ce77c (patch)
tree88b433b931b8ecaf82789f75df90df5e3e30fd56
parent134634823a4cec936c08ba5f0757a79ed5fd9f11 (diff)
downloadaur-8f4d81f5060558864829296ae22f5f96d12ce77c.tar.gz
Add git synchronisation functionality to update_SDK.zsh
-rwxr-xr-xupdate_SDK.zsh9
1 files changed, 8 insertions, 1 deletions
diff --git a/update_SDK.zsh b/update_SDK.zsh
index d189ccfaaa17..e081cb7d5fda 100755
--- a/update_SDK.zsh
+++ b/update_SDK.zsh
@@ -14,12 +14,19 @@ function update_to(){
makepkg --printsrcinfo > .SRCINFO
}
+function sync_git(){
+ local version=$1
+ git commit PKGBUILD -m "Update SDK to $version"
+ git push
+}
+
function main(){
version=$(get_version)
if grep -q "pkgver=$version" PKGBUILD; then
- printf "Up-to-date: version %s\n" $version
+ printf "Already up-to-date: version %s\n" $version
else
update_to $version
+ sync_git $version
fi
}