Skip to content

Commit

Permalink
update package helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Jul 22, 2017
1 parent bd600a1 commit 7e1a0a5
Show file tree
Hide file tree
Showing 2 changed files with 505 additions and 4 deletions.
12 changes: 8 additions & 4 deletions package.py
Expand Up @@ -55,13 +55,17 @@
import datetime
import os

from os.path import join as pjoin

def create_package(output_file=None):
scripts_dir = pjoin(os.path.abspath(os.path.split(__file__)[0]),"scripts")
pkg_script = pjoin(scripts_dir,"git_archive_all.py");
repo_name = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
if output_file is None:
suffix = "tar";
t = datetime.datetime.now()
output_file = "%s.%04d.%02d.%02d.%s" % (repo_name,t.year,t.month,t.day,suffix)
cmd = "git archive --format=tar --prefix=%s/ HEAD > %s " % (repo_name,output_file)
suffix = "tar"
t = datetime.datetime.now()
output_file = "%s.%04d.%02d.%02d.%s" % (repo_name,t.year,t.month,t.day,suffix)
cmd = "python " + pkg_script + " --prefix=conduit " + output_file
print "[exe: %s]" % cmd
subprocess.call(cmd,shell=True)

Expand Down

0 comments on commit 7e1a0a5

Please sign in to comment.