Add C API to publish.py script

Also update the amount of time we sleep between published crates, 10
seconds has proven to not be enough so we bump it to 16.
This commit is contained in:
Mark McCaskey
2020-09-22 15:26:00 -07:00
parent e88a341074
commit ac5627039d

View File

@@ -21,7 +21,7 @@ except ImportError:
# TODO: find this automatically
target_version = "1.0.0-alpha02.1"
target_version = "1.0.0-alpha3"
# TODO: generate this by parsing toml files
dep_graph = {
@@ -43,6 +43,9 @@ dep_graph = {
"wasmer-wasi": set(["wasmer"]),
"wasmer-wasi-experimental-io-devices": set(["wasmer-wasi"]),
"wasmer-emscripten": set(["wasmer"]),
"wasmer-c-api": set(["wasmer", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-singlepass",
"wasmer-compiler-llvm", "wasmer-emscripten", "wasmer-engine", "wasmer-engine-jit",
"wasmer-engine-native", "wasmer-wasi", "wasmer-types"]),
}
# where each crate is located in the `lib` directory
@@ -64,6 +67,7 @@ location = {
"wasmer-wasi": "wasi",
"wasmer-emscripten": "emscripten",
"wasmer-wasi-experimental-io-devices": "wasi-experimental-io-devices",
"wasmer-c-api": "c-api",
}
no_dry_run = False
@@ -116,11 +120,11 @@ def main():
else:
print("`{}` was already published!".format(crate))
continue
# sleep for 10 seconds between crates to ensure the crates.io index has time to update
# sleep for 16 seconds between crates to ensure the crates.io index has time to update
# this can be optimized with knowledge of our dep graph via toposort; we can even publish
# crates in parallel; however this is out of scope for the first version of this script
print("Sleeping for 10 seconds to allow the `crates.io` index to update...")
time.sleep(10)
print("Sleeping for 16 seconds to allow the `crates.io` index to update...")
time.sleep(16)
if __name__ == "__main__":