mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +00:00
include latest commit info in source tarball
This commit is contained in:
parent
52703e6464
commit
1c90bdd13f
@ -5,14 +5,13 @@ import sys
|
||||
import os
|
||||
import tempfile
|
||||
import shutil
|
||||
import re
|
||||
import commands
|
||||
import subprocess
|
||||
import atexit
|
||||
import optparse
|
||||
|
||||
cwd = os.getcwd()
|
||||
|
||||
|
||||
####################
|
||||
### Common helper functions
|
||||
####################
|
||||
@ -122,6 +121,8 @@ def main():
|
||||
if not exist_in_path('django-admin') and not exist_in_path('django-admin.py'):
|
||||
error('django-admin scripts not found in PATH')
|
||||
|
||||
latest_commit_info = commands.getoutput('git log %s -1' % branch)
|
||||
|
||||
# begin
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
info('tmpdir is %s' % tmpdir)
|
||||
@ -151,6 +152,10 @@ def main():
|
||||
if run('./i18n.sh compile-all', cwd=seahub_dir) != 0:
|
||||
error('failed to compile messages')
|
||||
|
||||
with open(os.path.join(seahub_dir, 'latest_commit'), 'w') as fp:
|
||||
fp.write(latest_commit_info)
|
||||
fp.write('\n')
|
||||
|
||||
if run('tar czvf %s seahub-%s' % (tarball_name, version)) != 0:
|
||||
error('failed to generate tarball')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user