summaryrefslogtreecommitdiff
path: root/extension/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'extension/scripts')
-rw-r--r--extension/scripts/continuedev-0.1.0-py3-none-any.whlbin51468 -> 53104 bytes
-rw-r--r--extension/scripts/install_from_source.py45
2 files changed, 45 insertions, 0 deletions
diff --git a/extension/scripts/continuedev-0.1.0-py3-none-any.whl b/extension/scripts/continuedev-0.1.0-py3-none-any.whl
index 68457b3e..d1483db9 100644
--- a/extension/scripts/continuedev-0.1.0-py3-none-any.whl
+++ b/extension/scripts/continuedev-0.1.0-py3-none-any.whl
Binary files differ
diff --git a/extension/scripts/install_from_source.py b/extension/scripts/install_from_source.py
new file mode 100644
index 00000000..4fe903ed
--- /dev/null
+++ b/extension/scripts/install_from_source.py
@@ -0,0 +1,45 @@
+import subprocess
+
+
+def run(cmd: str):
+ return subprocess.run(cmd, shell=True, capture_output=True)
+
+
+def main():
+ # Check for Python and Node - we won't install them, but will warn
+ out, err1 = run("python --version")
+ out, err2 = run("python3 --version")
+ if err1 and err2:
+ print("Python is required for Continue but is not installed on your machine. See https://www.python.org/downloads/ to download the latest version, then try again.")
+ return
+
+ out, err = run("node --version")
+ if err:
+ print("Node is required for Continue but is not installed on your machine. See https://nodejs.org/en/download/ to download the latest version, then try again.")
+ return
+
+ out, err = run("npm --version")
+ if err:
+ print("NPM is required for Continue but is not installed on your machine. See https://nodejs.org/en/download/ to download the latest version, then try again.")
+ return
+
+ out, err = run("poetry --version")
+ if err:
+ print("Poetry is required for Continue but is not installed on your machine. See https://python-poetry.org/docs/#installation to download the latest version, then try again.")
+ return
+
+ out, err = run("cd ../../continuedev; poetry run typegen")
+
+ out, err = run(
+ "cd ..; npm i; cd react-app; npm i; cd ..; npm run full-package\r y\r npm run install-extension")
+
+ if err:
+ print("Error installing the extension. Please try again.")
+ print("This was the error: ", err)
+ return
+
+ print("Continue VS Code extension installed successfully. Please restart VS Code to use it.")
+
+
+if __name__ == "__main__":
+ main()