Skip to content

Commit

Permalink
'notar' export now saved to cdn_export dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ggatward committed Dec 6, 2017
1 parent 302970f commit e5287d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- --notar export saved in /cdn_export dir rather than /export to prevent it being deleted


## [1.1.1] - 2017-10-25
Expand Down
7 changes: 6 additions & 1 deletion sat_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import fnmatch, subprocess, tarfile
import simplejson as json
from glob import glob
from distutils.dir_util import copy_tree
import helpers

try:
Expand Down Expand Up @@ -1065,7 +1066,6 @@ def main(args):
pickle.dump(exported_repos, open(export_dir + '/exported_repos.pkl', 'wb'))
pickle.dump(package_count, open(export_dir + '/package_count.pkl', 'wb'))


# Run GPG Checks on the exported RPMs
if not args.nogpg:
do_gpg_check(export_dir)
Expand All @@ -1085,6 +1085,11 @@ def main(args):
os.system("rm -f " + helpers.EXPORTDIR + "/*.pkl")
os.system("rm -f " + export_dir + "/*.pkl")

# Copy export_dir to cdn_export to prevent blowing it away next time we export
copy_tree(export_dir,helpers.EXPORTDIR + "/cdn_export")
# Cleanup
shutil.rmtree(helpers.EXPORTDIR + "/cdn_export/manifest", ignore_errors=True, onerror=None)
shutil.rmtree(export_dir)

# We're done. Write the start timestamp to file for next time
os.chdir(script_dir)
Expand Down

0 comments on commit e5287d1

Please sign in to comment.