From 0d354f7bd1ec26dd1bc24b0740e122f58cfe4643 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Tue, 15 Oct 2024 10:36:06 +0700 Subject: [PATCH] Update README and Taskfile.yml for easier new-dev setup (#1117) * Check out git submodules in `task setup` If the user cloned the git repo without `--recurse-submodules`, then running `task setup` will take care of the necessary step without needing to add a note to the README file (which is visible when looking at the repo on GitHub before cloning, but many people will clone the repo first and THEN look at the README). * Improve first-time setup instructions for new devs New devs might not know that they need to change the PowerShell execution policy to allow scripts, and also might not be familiar with how to set the PATH variable on Windows. So we'll add slightly more detailed instructions to the README. --- README.md | 15 ++++++++++++++- Taskfile.yml | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e19d5a8c0..598419a5f 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,23 @@ Other files, like `skaffold.yaml`, should be at the root of the repo, because th * mac: `brew install go-task/tap/go-task` * via npm: `npm install -g @go-task/cli` * install [Skaffold](https://skaffold.dev/docs/install/#standalone-binary) and add it to your path + * the file you will download is **NOT** an installer, just a standalone runnable .exe (on Windows) or binary (on Linux) + * on Linux, a good practice is to create `$HOME/.local/bin` and put binaries there; most distributions automatically add `$HOME/.local/bin` to your path if it exists + * don't forget to run `chmod +x $HOME/.local/bin/skaffold` + * on Windows, we suggest creating a `bin` folder in your home folder. Put the Skaffold binary there, then do the following: + * go to your System properties, click the **Advanced** tab, and click **Environment Variables...** + * Click the Path variable (in either User or System, User is recommended) and click the **Edit...** button + * Add `C:\Users\YOUR_USER_NAME\bin` to the list and click **OK** * clone the repo - * run setup `task setup`, which: + * run `git push` to make sure your GitHub credentials are set up + * on Windows, allow the Git Credential Manager to log in to GitHub via your browser + * on Linux, upload your SSH key to your GitHub account if you haven't done so already, then run `git remote set-url --push origin git@github.com:sillsdev/languageforge-lexbox` + * on Windows, open PowerShell and run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned` + * this is necessary before running `task setup` below, which uses a PowerShell script to download seed data + * run `task setup`, which: * initializes a local.env file * tells Git to use our ignore revs file + * checks out Git submodules * downloads the FLEx repo for the project seed data #### Extra setup steps for Windows diff --git a/Taskfile.yml b/Taskfile.yml index e477c0233..ca2e265ab 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -34,6 +34,9 @@ tasks: deps: [ setup-win, setup-unix ] cmds: - git config blame.ignoreRevsFile .git-blame-ignore-revs + - git submodule init + - git submodule update --recursive + - git config --local submodule.recurse true - kubectl --context=docker-desktop apply -f deployment/setup/namespace.yaml - kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.0/cert-manager.yaml - docker build -t local-dev-init data/