Esempio n. 1
0
#!/usr/bin/env python
import sys
from NikGapps.Helper import FileOp
from Release import Release
import Config
from NikGapps.Helper.Constants import Constants
from NikGapps.Helper.Git import Git
from NikGapps.Helper.SystemStat import SystemStat
import pytz
from datetime import datetime

print("Start of the Program")

SystemStat.show_stats()

start_time = Constants.start_of_function()

tz_London = pytz.timezone('Europe/London')
datetime_London = datetime.now(tz_London)
print("London:", datetime_London.strftime("%a, %m/%d/%Y, %H:%M:%S"))
print("---------------------------------------")
commit_message = datetime_London.strftime("%Y-%m-%d %H:%M:%S")

# find the argument length
arg_len = len(sys.argv)
# initialize android versions and package list to build
android_versions = [Config.TARGET_ANDROID_VERSION]
package_list = Config.BUILD_PACKAGE_LIST
if arg_len > 1:
    android_versions = sys.argv[1].split(',')
    if arg_len > 2:
Esempio n. 2
0
import sys
from pathlib import Path
import Config
import git
from git import Repo

from NikGapps.Git.GitApi import GitApi
from Release import Release
from NikGapps.Helper.Constants import Constants
from NikGapps.Helper.FileOp import FileOp

actual_start_time = Constants.start_of_function()
print("Checking if there is any existing workflow in progress")

try:
    workflows = GitApi.get_running_workflows(authenticate=False)
except Exception as e:
    print(str(e))
    try:
        workflows = GitApi.get_running_workflows(authenticate=True)
    except Exception as e:
        print(str(e))
        workflows = []

print("Total Open Workflows: " + str(len(workflows)))

if len(workflows) > 1:
    print("Open workflows detected, Let's wait for open workflows to finish")
    exit(0)
if Config.BUILD_CONFIG:
    arg_len = len(sys.argv)