From: Mathieu Baudier Date: Tue, 19 Aug 2025 07:32:54 +0000 (+0200) Subject: Automate upstream update X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=0525b10156b348da4ceedae1fae32fa6dc9dd3b5;p=pkg%2Fggml Automate upstream update --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bd2ec5a --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ + +GGML_CHECKOUT=323951f +LLAMA_CPP_CHECKOUT=f08c4c0 + +GGML_BASE=sources/ggml + +update-ggml: + # switch to upstream branches and tag a commit + git -C $(GGML_BASE) switch master + git -C $(GGML_BASE) pull --tags github master + git -C $(GGML_BASE) switch upstream/latest + git -C $(GGML_BASE) pull --tags github master + + $(eval GGML_BUILD_NUMBER = $(shell git -C $(GGML_BASE) rev-list --count $(GGML_CHECKOUT))) + @echo "GGML_BUILD_NUMBER=$(GGML_BUILD_NUMBER)" + git -C $(GGML_BASE) tag -a -m "Pinned upstream commit" upstream/0.0.$(GGML_BUILD_NUMBER) $(GGML_CHECKOUT) + + # Import patches before merging + git -C $(GGML_BASE) switch debian/latest + cd $(GGML_BASE) && gbp pq import + + # Merges + git -C $(GGML_BASE) switch debian/latest + git -C $(GGML_BASE) merge --no-edit upstream/0.0.$(GGML_BUILD_NUMBER) + + git -C $(GGML_BASE) switch patch-queue/debian/latest + git -C $(GGML_BASE) merge --no-edit debian/latest + + # Rebase patches + cd $(GGML_BASE) && gbp pq rebase + cd $(GGML_BASE) && gbp pq export --drop + + # Generate changelog + echo "ggml (0.0.$(GGML_BUILD_NUMBER)-1) unstable; urgency=medium" > $(GGML_BASE)/debian/changelog + echo "" >> $(GGML_BASE)/debian/changelog + echo " * Update upstream" >> $(GGML_BASE)/debian/changelog + echo "" >> $(GGML_BASE)/debian/changelog + echo " Closes: #1096105" >> $(GGML_BASE)/debian/changelog + echo "" >> $(GGML_BASE)/debian/changelog + echo " -- Mathieu Baudier $(shell date --utc '+%a, %d %b %+4Y %T %z')" >> $(GGML_BASE)/debian/changelog + + git commit -m "Update upstream" +