def build()

in core/swift53Action/swiftbuild.py [0:0]


def build(source_dir, target_file, buildcmd):
    r, o, e = swift_build(source_dir, buildcmd)
    #if e: print(e)
    #if o: print(o)
    if r != 0:
        print(e)
        print(o)
        print(r)
        return

    bin_file = "%s/.build/release/Action" % source_dir
    os.rename(bin_file, target_file)
    if not os.path.isfile(target_file):
        print("failed %s -> %s" % (bin_file, target_file))
        return