125b134d87
MinecraftForge/FML@155e846818 Add in support for mods/<mcversion> as a mod location. Also drop coremods as a location. They go in mods too now. MinecraftForge/FML@3f4bf61ae6 Update key MinecraftForge/FML@4545beb49d Add deobf-data to setup env. MinecraftForge/FML@e24f949517 Fix eclipse workspaces and launch configurations. MinecraftForge/FML@532bee7ce1 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues.
51 lines
No EOL
1.5 KiB
Python
51 lines
No EOL
1.5 KiB
Python
import subprocess, sys, os
|
|
from pprint import pformat
|
|
from optparse import OptionParser
|
|
|
|
def run_command(command, cwd='.'):
|
|
#print('Running command: ')
|
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, cwd=cwd)
|
|
out, err = process.communicate()
|
|
out = out.strip('\n')
|
|
#print(pformat(out.split('\n')))
|
|
if process.returncode:
|
|
print('failed: %d' % process.returncode)
|
|
return None
|
|
return out.split('\n')
|
|
|
|
def main(options, args):
|
|
output = run_command(['git', 'diff', '--no-color', '--', 'fml'])
|
|
if output is None:
|
|
print('Failed to grab submodule commits')
|
|
sys.exit(1)
|
|
|
|
start = None
|
|
end = None
|
|
for line in output:
|
|
if not 'Subproject commit' in line:
|
|
continue
|
|
if line[0:18] == '-Subproject commit':
|
|
start = line[19:]
|
|
elif line[0:18] == '+Subproject commit':
|
|
end = line[19:]
|
|
if end.endswith('-dirty'):
|
|
end = end[0:len(end)-6]
|
|
|
|
if start == None or end == None:
|
|
print('Could not extract start and end range')
|
|
sys.exit(1)
|
|
|
|
#print('Start: %s' % start)
|
|
#print('End: %s' % end)
|
|
|
|
output = run_command(['git', 'log', '--reverse', '--pretty=oneline', '%s...%s' % (start, end)], './fml')
|
|
print('Updated FML:')
|
|
for line in output:
|
|
print('MinecraftForge/FML@%s' % line)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
parser = OptionParser()
|
|
options, args = parser.parse_args()
|
|
|
|
main(options, args) |