Skip to content

Commit

Permalink
Add .gitignore files for entry dirs when precomputing data
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrehn committed Aug 12, 2020
1 parent cf716dc commit 31bfa13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions conan_ue4cli/commands/precompute.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ def precompute(manager, argv):
# Add any system libraries to our list
flags['system_libs'] += dependency['system_libs']

# If any of our generated directories are empty then ensure they won't be ignored by version control
for directory in [includeDir, libDir, binDir, dataDir]:
if len(list(os.listdir(directory))) == 0:
ConanTools.save(join(directory, '.gitignore'), '!.gitignore\n')

# Write the additional flags to file
flagsFile = join(args.dir, 'precomputed', engineVersion, targetID, 'flags.json')
ConanTools.save(flagsFile, json.dumps(flags, sort_keys=True, indent=4))
Expand Down

0 comments on commit 31bfa13

Please sign in to comment.