def do_package():
	def get_commands():

		login_cmd = "Login [email protected] 123456"
		load_spec_cmd = "LoadSpec {spec}".format(spec=config.RELEASE_SPEC)
		build_update_cmd = "BuildUpdate server_windows {newVersion} {oldVersion} ".format(
			newVersion=config.VER_INCREMENT_LOCATION, oldVersion=util.get_local_version())

		package_out = os.path.join(config.ROOT_DIR, "StrifeServer").replace("\\", "/")
		gen_dir = os.path.join(config.ROOT_DIR, "tmp/update_server").replace("\\", "/")

		set_var = "set updategen_distDir %s" % gen_dir
		manifest = os.path.join(gen_dir, "manifests/strife-cn_prod-server-windows-x86",
		                        util.get_new_version() + ".xml").replace("\\", "/")

		build_install_cmd = "BuildInstall {manifest} {package_out}".format(manifest=manifest,
		                                                                   package_out=package_out)
		quit_cmd = "quit"
		cmds = ";".join(
			[set_var, login_cmd, load_spec_cmd, build_update_cmd, build_install_cmd,quit_cmd])
		return cmds

	util.clear_package_log()
	util.update_cvar()
	util.update_host()

	old_cwd = os.getcwd()
	os.chdir(config.STRIFE_DIR)
	cmd = '{update_generator} -autoexec "{cmds}"'.format(update_generator=config.UPDATE_GENERATOR, cmds=get_commands())
	print cmd
	os.system(cmd)
	os.chdir(old_cwd)
示例#2
0
def do_package():
    def get_commands():
        login_cmd = "Login [email protected] 123456"
        load_spec_cmd = "LoadSpec {spec}".format(spec=config.RELEASE_SPEC)
        build_update_cmd = "BuildUpdate windows {newVersion} {oldVersion} ".format(
            newVersion=config.VER_INCREMENT_LOCATION,
            oldVersion=util.get_local_version())
        pending_request_cmd = "ProcessPendingRequests"
        # set_live_cmd = "SetManifestLive windows"
        build_install_cmd = "BuildInstall {manifest} {package_out}".format(
            manifest=util.get_new_manifest(), package_out=config.PACKAGE_OUT)
        quit_cmd = "quit"
        cmds = ";".join([
            login_cmd, load_spec_cmd, build_update_cmd, pending_request_cmd,
            build_install_cmd, quit_cmd
        ])
        return cmds

    util.clear_package_log()
    util.update_cvar()
    util.update_host()

    old_cwd = os.getcwd()
    os.chdir(config.STRIFE_DIR)
    cmd = '{update_generator} -autoexec "{cmds}"'.format(
        update_generator=config.UPDATE_GENERATOR, cmds=get_commands())

    os.system(cmd)
    os.chdir(old_cwd)
示例#3
0
def do_package():
    def get_commands():

        login_cmd = "Login [email protected] 123456"
        load_spec_cmd = "LoadSpec {spec}".format(spec=config.RELEASE_SPEC)
        build_update_cmd = "BuildUpdate server_windows {newVersion} {oldVersion} ".format(
            newVersion=config.VER_INCREMENT_LOCATION,
            oldVersion=util.get_local_version())

        package_out = os.path.join(config.ROOT_DIR,
                                   "StrifeServer").replace("\\", "/")
        gen_dir = os.path.join(config.ROOT_DIR,
                               "tmp/update_server").replace("\\", "/")

        set_var = "set updategen_distDir %s" % gen_dir
        manifest = os.path.join(gen_dir,
                                "manifests/strife-cn_prod-server-windows-x86",
                                util.get_new_version() + ".xml").replace(
                                    "\\", "/")

        build_install_cmd = "BuildInstall {manifest} {package_out}".format(
            manifest=manifest, package_out=package_out)
        quit_cmd = "quit"
        cmds = ";".join([
            set_var, login_cmd, load_spec_cmd, build_update_cmd,
            build_install_cmd, quit_cmd
        ])
        return cmds

    util.clear_package_log()
    util.update_cvar()
    util.update_host()

    old_cwd = os.getcwd()
    os.chdir(config.STRIFE_DIR)
    cmd = '{update_generator} -autoexec "{cmds}"'.format(
        update_generator=config.UPDATE_GENERATOR, cmds=get_commands())
    print cmd
    os.system(cmd)
    os.chdir(old_cwd)
def do_package():
	def get_commands():
		login_cmd = "Login [email protected] 123456"
		load_spec_cmd = "LoadSpec {spec}".format(spec=config.RELEASE_SPEC)
		build_update_cmd = "BuildUpdate windows {newVersion} {oldVersion} ".format(newVersion = config.VER_INCREMENT_LOCATION, oldVersion = util.get_local_version())
		pending_request_cmd = "ProcessPendingRequests"
		# set_live_cmd = "SetManifestLive windows"
		build_install_cmd = "BuildInstall {manifest} {package_out}".format(manifest=util.get_new_manifest(),
		                                                                   package_out=config.PACKAGE_OUT)
		quit_cmd = "quit"
		cmds = ";".join(
			[login_cmd, load_spec_cmd, build_update_cmd, pending_request_cmd, build_install_cmd, quit_cmd])
		return cmds

	util.clear_package_log()
	util.update_cvar()
	util.update_host()

	old_cwd = os.getcwd()
	os.chdir(config.STRIFE_DIR)
	cmd = '{update_generator} -autoexec "{cmds}"'.format(update_generator=config.UPDATE_GENERATOR, cmds=get_commands())

	os.system(cmd)
	os.chdir(old_cwd)