[gnome-build-meta/abderrahim/update-refs-script: 4/4] Add script to update refs
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/update-refs-script: 4/4] Add script to update refs
- Date: Tue, 4 Oct 2022 14:21:09 +0000 (UTC)
commit 33437a488cdd0163726b5f3520696c14bff10ec1
Author: Abderrahim Kitouni <abderrahim kitouni codethink co uk>
Date: Tue Oct 4 15:49:18 2022 +0200
Add script to update refs
utils/update_refs.py | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
---
diff --git a/utils/update_refs.py b/utils/update_refs.py
new file mode 100755
index 000000000..ff5409b57
--- /dev/null
+++ b/utils/update_refs.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+from datetime import datetime
+
+now = datetime.now()
+
+track_elements = [
+ "core.bst",
+ "flatpak-runtimes.bst",
+ "vm/image.bst",
+ "boards/pinebook-pro/image.bst",
+ "boards/pinephone/image.bst",
+ "boards/pinephone-pro/image.bst",
+ "boards/rock64/image.bst",
+ "boards/raspberrypi-4/image.bst",
+ "vm/repo-devel.bst",
+ "iso/image.bst",
+]
+
+bst_command = os.environ.get("BST", "bst").split()
+
+
+def git(*args):
+ return subprocess.check_call(["git"] + list(args))
+
+
+def bst(*args):
+ return subprocess.check_call(bst_command + ["--no-interactive"] + list(args))
+
+
+git(
+ "switch",
+ "--force-create",
+ "update-bot/" + now.strftime("%F-%H-%M"),
+)
+
+bst("track", "--deps", "all", *track_elements)
+
+git("add", "--update", ".")
+
+git("commit", "--message", "Update element refs")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]