Last active
November 18, 2016 10:03
-
-
Save vaskaloidis/deeb0282e6655abd4c0d652f68966dd3 to your computer and use it in GitHub Desktop.
Python script that parses a Liferay .gitignore file, and runs an svn:ignore against each row (file, file-type or dir) in the .gitignore file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/python | |
| # | |
| # Build the entire ISAAC Project | |
| import subprocess | |
| import os | |
| import sys | |
| #args.extend(['package']) | |
| defaultArgs = ['propset', 'svn:ignore'] | |
| def runthis(argumentsParam): | |
| return subprocess.check_call(['svn'] + argumentsParam) | |
| with open('./liferay-ignore.txt', 'r') as f: | |
| for x in f: | |
| x = x.rstrip() | |
| if not x: continue | |
| args = None | |
| args = defaultArgs | |
| y = '"' + x + '"' | |
| args.extend([y]) | |
| print("Build Arguments") | |
| print(args) | |
| # runthis(args) | |
| otherArgs = ['propset', 'svn:ignore'] | |
| newArgs = otherArgs | |
| y = '"' + x + '"' | |
| newArgs.extend([y]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment