emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/request 131a3d4 4/7: getting sha1's correct in cross-repo


From: ELPA Syncer
Subject: [nongnu] elpa/request 131a3d4 4/7: getting sha1's correct in cross-repo PRs gets complicated
Date: Fri, 12 Feb 2021 14:57:09 -0500 (EST)

branch: elpa/request
commit 131a3d40c2ab11520ff67987be9a339a781db93c
Author: dickmao <none>
Commit: dickmao <none>

    getting sha1's correct in cross-repo PRs gets complicated
---
 .github/workflows/test.yml |  9 ++++++---
 Makefile                   | 11 +++++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 51d38f9..a51caa6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -96,8 +96,11 @@ jobs:
         sh tools/install-cask.sh
         cask link list
 
+    - name: test-install
+      if: startsWith(runner.os, 'Linux')
+      run: make test-install
+      continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}
+
     - name: test
-      run: |
-        make test-install
-        make test
+      run: make test
       continue-on-error: ${{ matrix.emacs_version == 'snapshot' }}
diff --git a/Makefile b/Makefile
index 0a29ad0..c9eb258 100644
--- a/Makefile
+++ b/Makefile
@@ -81,15 +81,22 @@ endef
 
 define SET_GITHUB_SHA =
 ifeq ($(GITHUB_SHA),)
-GITHUB_SHA := $(shell if git show-ref --quiet --verify 
origin/$(GITHUB_HEAD_REF) ; then git rev-parse origin/$(GITHUB_HEAD_REF) ; fi)
+GITHUB_SHA := $(shell git rev-parse HEAD)
 endif
 endef
 
+define SET_GITHUB_COMMIT =
+GITHUB_COMMIT := $(shell if git show -s --format=%s "${GITHUB_SHA}" | egrep -q 
"^Merge .* into" ; then git show -s --format=%s "${GITHUB_SHA}" | cut -d " " 
-f2 ; else echo "${GITHUB_SHA}" ; fi)
+endef
+
 .PHONY: test-install-vars
 test-install-vars:
        $(eval $(call SET_GITHUB_REPOSITORY))
        $(eval $(call SET_GITHUB_HEAD_REF))
        $(eval $(call SET_GITHUB_SHA))
+       $(eval $(call SET_GITHUB_COMMIT))
+       git show -s --format=%s $(GITHUB_COMMIT)
+       git show -s --format=%s $(GITHUB_SHA)
        @true
 
 .PHONY: test-install
@@ -113,7 +120,7 @@ test-install: test-install-vars
                   (make-directory package-build-archive-dir))" \
        --eval "(let* ((my-repo \"$(GITHUB_REPOSITORY)\") \
                       (my-branch \"$(GITHUB_HEAD_REF)\") \
-                      (my-commit \"$(GITHUB_SHA)\")) \
+                      (my-commit \"$(GITHUB_COMMIT)\")) \
                   (oset rcp :repo my-repo) \
                   (oset rcp :branch my-branch) \
                   (oset rcp :commit my-commit))" \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]