From ef838a4e187e8d9a048b2f0dc1010f89d6fc0130 Mon Sep 17 00:00:00 2001 From: jotaen4tinypilot <83721279+jotaen4tinypilot@users.noreply.github.com> Date: Wed, 15 May 2024 19:22:06 +0200 Subject: [PATCH] Move install-related dev scripts to device/ folder (#1793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related https://github.com/tiny-pilot/tinypilot/issues/1716. Stacked on https://github.com/tiny-pilot/tinypilot/pull/1791. This PR moves both install-related dev scripts to a new subfolder `device/`. This is mostly for clarity, to communicate that these two scripts are not supposed to be executed on a dev machine. Initially I thought we should also move the [`enable-passwordless-sudo` script](https://github.com/tiny-pilot/tinypilot/blob/master/dev-scripts/enable-passwordless-sudo) there as well, but I’m not so sure about that anymore, because I think it also would be possible to run it in a dev environment. E.g., we also [run it on CI for the e2e tests](https://github.com/tiny-pilot/tinypilot/blob/3323b235e53d2306c5daba58a1d855d5d1575d91/.circleci/config.yml#L162-L164). Review
on CodeApprove --------- Co-authored-by: Jan Heuermann --- CONTRIBUTING.md | 6 +++--- dev-scripts/{ => device}/install-bundle | 0 dev-scripts/{ => device}/install-from-source | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename dev-scripts/{ => device}/install-bundle (100%) rename dev-scripts/{ => device}/install-from-source (95%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e7015975..bc9bde0db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -163,9 +163,9 @@ To build and install your changes on device, perform the following steps: ``` 1. On the device, clone the TinyPilot repo to a temporary directory. 1. Check out the branch that has your changes. -1. Run the [`dev-scripts/install-from-source`](dev-scripts/install-from-source) script to build and install your branch's code. For example: +1. Run the [`dev-scripts/device/install-from-source`](dev-scripts/device/install-from-source) script to build and install your branch's code. For example: ```bash - sudo dev-scripts/install-from-source + sudo dev-scripts/device/install-from-source ``` ### Installing a TinyPilot bundle @@ -188,7 +188,7 @@ curl \ --silent \ --show-error \ --location \ - https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/dev-scripts/install-bundle | \ + https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/dev-scripts/device/install-bundle | \ sudo bash -s -- \ url-to-bundle-file # replace this line with your bundle URL ``` diff --git a/dev-scripts/install-bundle b/dev-scripts/device/install-bundle similarity index 100% rename from dev-scripts/install-bundle rename to dev-scripts/device/install-bundle diff --git a/dev-scripts/install-from-source b/dev-scripts/device/install-from-source similarity index 95% rename from dev-scripts/install-from-source rename to dev-scripts/device/install-from-source index 9122a8361..a05b41359 100755 --- a/dev-scripts/install-from-source +++ b/dev-scripts/device/install-from-source @@ -45,4 +45,4 @@ mv "${LATEST_DEBIAN_PACKAGE}" ./bundler/bundle/ LATEST_INSTALL_BUNDLE="${PWD}/$(ls -t bundler/dist/tinypilot*.tgz | head -n 1)" readonly LATEST_INSTALL_BUNDLE -sudo ./dev-scripts/install-bundle "${LATEST_INSTALL_BUNDLE}" +sudo ./dev-scripts/device/install-bundle "${LATEST_INSTALL_BUNDLE}"