Commits

Jed Brown  committed ee13f3e Merge

Merge branch 'balay/nightlybuilds-change-to-git' of bitbucket:petsc/petsc

* 'balay/nightlybuilds-change-to-git' of bitbucket:petsc/petsc:
git: rev-parse adds newlines and breaks compiles. reverting to 'log -1'
nightlybuilds: add -x to 'git clean' for buildtest aswell

  • Participants
  • Parent commits 97339a3, 86e03cb

Comments (0)

Files changed (3)

File bin/maint/builddist

 
 #generated a couple of more values
 version_patch_date=`date`
-version_git=`git rev-parse HEAD`
+version_git=`git log -1 --pretty=format:%H`
 version_date_git=`git log -1 --pretty=format:%ci`
 if  [ ${version_release} = 0 ]; then
   if [ "$branch" = "master" ]; then

File bin/maint/buildtest

 # This also requires 'clean' extension enabled on all nightly build machines.
 
 echo "Cleaning throughly and updating git clone at $nPETSC_DIR" >>& build.log
-(git reset --hard; git clean -q -d -f -e build.log;git pull -q) >>& build.log
+(git reset --hard; git clean -q -f -d -x -e build.log;git pull -q) >>& build.log
 
 # if externalpackage tarball also packs a git repo - one has to explicitly remove it
 rm -rf ./externalpackages

File config/PETSc/utilities/petscdir.py

       self.isClone = 1
       if os.path.exists(os.path.join(self.dir, '.git')):
         if hasattr(self.sourceControl,'git'):
-          self.addDefine('VERSION_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" rev-parse --verify HEAD").read()+'"')
+          self.addDefine('VERSION_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%H").read()+'"')
           self.addDefine('VERSION_DATE_GIT','"'+os.popen("cd "+self.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%ci").read()+'"')
         else:
           self.logPrintBox('\n*****WARNING: PETSC_DIR appears to be a Git clone - but git is not found in PATH********\n')