forked from Temperantia8/TavernofSoul
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_controller.py
More file actions
32 lines (27 loc) · 821 Bytes
/
git_controller.py
File metadata and controls
32 lines (27 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 7 19:49:09 2021
@author: Intel
"""
import subprocess
from os.path import join
import os
import csv
def read_version(filename):
rev = {}
with open(filename, 'r') as f:
w = csv.reader(f)
for lines in w:
if len(lines)<2:
continue
rev[lines[0]] = lines[1]
return rev
if __name__ == "__main__":
subprocess.run(['git', 'pull'])
versions = read_version(join('downloader', 'revision.csv'))
version = ""
for region in ['itos', 'ktos', 'ktest', 'jtos','twtos']:
version = "{} | {} : {}".format(version , region, versions[region])
subprocess.run(['git', 'add', '.'])
subprocess.run(['git', 'commit', '-m', '"{}"'.format(version)])
subprocess.run(['git', 'push'])