[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))" \
- [nongnu] elpa/request updated (996a87d -> c5a1068), ELPA Syncer, 2021/02/12
- [nongnu] elpa/request b1e5b8f 2/7: gha badge, ELPA Syncer, 2021/02/12
- [nongnu] elpa/request e77d005 1/7: fix S-exp format as (declare (indent 1)), ELPA Syncer, 2021/02/12
- [nongnu] elpa/request ee0c5a4 3/7: goose gha, ELPA Syncer, 2021/02/12
- [nongnu] elpa/request 8a5979f 5/7: If there's a better way to get the originating repo of PR, ELPA Syncer, 2021/02/12
- [nongnu] elpa/request 705dd98 6/7: get it to work locally too, ELPA Syncer, 2021/02/12
- [nongnu] elpa/request 131a3d4 4/7: getting sha1's correct in cross-repo PRs gets complicated,
ELPA Syncer <=
- [nongnu] elpa/request c5a1068 7/7: Merge pull request #198 from dickmao/conao3-fix-readme, ELPA Syncer, 2021/02/12