[SCM] LAMMPS Molecular Dynamics Simulator branch, master, updated. bc9de149b0a7ded4b5eb29aa6b4a39ca12dc1c89

Anton Gladky gladky.anton at gmail.com
Sun Feb 26 14:11:59 UTC 2012


The following commit has been merged in the master branch:
commit bc9de149b0a7ded4b5eb29aa6b4a39ca12dc1c89
Author: Anton Gladky <gladky.anton at gmail.com>
Date:   Sun Feb 26 15:07:10 2012 +0100

    Add script for creating a tarball from the upstreams git-repo.

diff --git a/debian/scripts/get_orig.py b/debian/scripts/get_orig.py
new file mode 100755
index 0000000..35aa17c
--- /dev/null
+++ b/debian/scripts/get_orig.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# The script creates a tar.xz tarball from git-repository of LAMMPS-project
+# ./get_orig commitID   -   creates a tarball of specified commit
+# ./get_orig   - creates a tarball of the latest version
+# Packages, that needs to be installed to use the script:
+# atool, python-git, git-core
+
+
+import os, sys, git
+
+print "Cloning the git-repo."
+os.system('git clone http://git.icms.temple.edu/lammps-ro.git git_temp_packaging')
+repo = git.Repo("./git_temp_packaging/")
+rev = ''
+head = ''
+
+if (len(sys.argv) > 1):
+  rev = str(sys.argv[1])
+  print 'Trying to clone the specified revision %s.' % (rev)
+  os.system('cd ./git_temp_packaging/; git checkout -b temp %s' % (rev))
+  head = repo.commits('temp')[0]
+else:
+  print "Cloned the latest revision."
+  head = repo.commits()[0]
+
+rev = str(head)[:7]
+dateP = head.authored_date
+versionN = "0~%04d%02d%02d.git%s" % (dateP.tm_year, dateP.tm_mon, dateP.tm_mday, rev)
+folderName = 'lammps-%s' % (versionN)
+print 'Packaged commit is %s' % (rev)
+print 'Version number %s' % (versionN)
+
+#renaming the folder
+os.system('mv git_temp_packaging %s' % (folderName))
+#removing  git-dir
+os.system('rm -rf %s/.git' % (folderName))
+#packing
+print "Creating a tarball."
+os.system('apack lammps_%s.orig.tar.xz %s' % (versionN, folderName))
+
+
+print 'Removing temporary cloned git-repo.'
+os.system('rm -rf folderName')

-- 
LAMMPS Molecular Dynamics Simulator



More information about the debian-science-commits mailing list