[commit: ghc] wip/jenkins: Fix source directory name (3a2dd88)

git at git.haskell.org git at git.haskell.org
Sat Jun 17 13:52:27 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/jenkins
Link       : http://ghc.haskell.org/trac/ghc/changeset/3a2dd88d7ab9ef5f8eea27755bfc9760c9f7a846/ghc

>---------------------------------------------------------------

commit 3a2dd88d7ab9ef5f8eea27755bfc9760c9f7a846
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Jun 4 11:06:15 2017 -0400

    Fix source directory name


>---------------------------------------------------------------

3a2dd88d7ab9ef5f8eea27755bfc9760c9f7a846
 Jenkinsfile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b709774..59daa63 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -40,7 +40,12 @@ stage("Build source distribution") {
       sh "mv sdistprep/ghc-${version}-src.tar.xz ghc-src.tar.xz"
       sh "mv sdistprep/ghc-${version}-testsuite.tar.xz ghc-testsuite.tar.xz"
       sh "mv sdistprep/ghc-${version}-windows-extra-src.tar.xz ghc-win32-tarballs.tar.xz"
-      stash(name: 'source-dist', includes: 'ghc-src.tar.xz,ghc-win32-tarballs.tar.xz')
+
+      def json = new JSONObject()
+      json.put('dirName', "ghc-${version}")
+      writeJSON(file: 'src-dist.json', json: json)
+
+      stash(name: 'source-dist', includes: 'ghc-src.tar.xz,ghc-win32-tarballs.tar.xz,src-dist.json')
       stash(name: 'testsuite-dist', includes: 'ghc-testsuite.tar.xz')
     }
   }
@@ -216,7 +221,9 @@ def withGhcSrcDist(Closure f) {
       sh 'tar -xf ghc-src.tar.xz'
       sh 'tar -xf ghc-win32-tarballs.tar.xz'
     }
-    dir('ghc-*') {
+
+    def metadata = readJSON file: 'src-dist.json'
+    dir(metadata.dirName) {
       f()
     }
   }



More information about the ghc-commits mailing list