From a38bce278b9198aec113feae67a0f365f2c021da Mon Sep 17 00:00:00 2001
From: Samuel Burbulla <samuel.burbulla@mathematik.uni-stuttgart.de>
Date: Thu, 4 Mar 2021 12:27:15 +0100
Subject: [PATCH] Just copy README.md.

---
 bin/dunepackaging.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/dunepackaging.py b/bin/dunepackaging.py
index ced05816c..b244b269c 100755
--- a/bin/dunepackaging.py
+++ b/bin/dunepackaging.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-import sys, os, io, getopt, re
+import sys, os, io, getopt, re, shutil
 import importlib, subprocess
 import email.utils
 import pkg_resources
@@ -118,6 +118,7 @@ def main(argv):
             sys.exit(2)
 
         # append hash of current git commit to README
+        shutil.copy('README.md', 'tmp_README.md')
         githash = ['git', 'rev-parse', 'HEAD']
         hash = subprocess.check_output(githash, encoding='UTF-8')
         with open("README.md", "a") as f:
@@ -135,9 +136,8 @@ def main(argv):
         gitreset = ['git', 'reset', 'setup.py', 'pyproject.toml']
         subprocess.call(gitreset)
 
-        # checkout README.md
-        gitcheckout = ['git', 'checkout', 'README.md']
-        subprocess.call(gitcheckout)
+        # restore README.md
+        shutil.move('tmp_README.md', 'README.md')
 
         if not onlysdist:
             # check if we have twine
-- 
GitLab