commit:     4b2e44f2d4b5e2215259553f4f740777078fd557
Author:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 11:07:29 2019 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Tue Dec 24 09:58:27 2019 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4b2e44f2

release-userspace: skip commit if no changes

Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 gentoo/release-userspace.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gentoo/release-userspace.sh b/gentoo/release-userspace.sh
index 4eafdf37..f9473260 100644
--- a/gentoo/release-userspace.sh
+++ b/gentoo/release-userspace.sh
@@ -74,6 +74,9 @@ setLiveReleaseDate() {
         sed -i "/^MY_RELEASEDATE=/s/.*/MY_RELEASEDATE=\"${RELEASEDATE}\"/" 
"${PN}-9999.ebuild"
         sed -i 
"/SRC_URI/s...@raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/relea...@github.com/SELinuxProject/selinux/releases/download@"
 "${PN}-9999.ebuild"
 
+        # no changes, skip
+        [[ -z "$(git status --porcelain -- .)" ]] && continue
+
         # commit changes
         git add "${PN}-9999.ebuild"
         git --no-pager diff --cached

Reply via email to