diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-09-15 18:36:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-15 18:36:27 -0400 |
commit | c9ef182886cc07d35a5b27fb89163d8cf21a6a47 (patch) | |
tree | 6ba1605daa7e9e8cac3f6b926374086906f571b5 /tools/cargo_publish_others.py | |
parent | 1d305c2ac785af6b28649f2023d5008e390eeca0 (diff) |
Make deno_cli installable via crates.io (#2946)
- Fixes cargo publish on deno_typescript, deno_cli_snapshots, and
deno_cli.
- Combines cli_snapshots and js into one directory.
- Extracts TS version at compile time rather than runtime
- Bumps version awkwardly - it was necessary to test end-to-end
publishing. Sorry.
- Adds git submodule deno_typescript/typescript
Diffstat (limited to 'tools/cargo_publish_others.py')
-rwxr-xr-x | tools/cargo_publish_others.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/cargo_publish_others.py b/tools/cargo_publish_others.py new file mode 100755 index 000000000..4b57c37c0 --- /dev/null +++ b/tools/cargo_publish_others.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# Publishes 'deno_cli', 'deno_cli_snapshots', and 'deno_typescript' crates. +# DOES NOT PUBLISH 'deno' crate see tools/cargo_package.py for that. + +import os +import sys +import argparse +from util import run, root_path + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--dry-run", action="store_true") + args = parser.parse_args() + + cargo_publish = ["cargo", "publish"] + if args.dry_run: + cargo_publish += ["--dry-run"] + + # Publish the deno_typescript crate. + os.chdir(os.path.join(root_path, "deno_typescript")) + run(cargo_publish) + + # Publish the deno_cli_snapshots crate. + os.chdir(os.path.join(root_path, "js")) + run(cargo_publish) + + # Publish the deno_cli crate. + os.chdir(os.path.join(root_path, "cli")) + run(cargo_publish) + + +if __name__ == '__main__': + sys.exit(main()) |