From 55fc28dacf9db685a69729fa62424d2165cb4ccf Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 17 May 2023 10:35:08 +0300 Subject: [PATCH] Add install/publish commands for Windows --- .env.bat.example | 3 +++ .gitignore | 1 + .yarnrc.yml | 6 +++--- package.json | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .env.bat.example diff --git a/.env.bat.example b/.env.bat.example new file mode 100644 index 0000000..5611bba --- /dev/null +++ b/.env.bat.example @@ -0,0 +1,3 @@ +set TARGET_REGISTRY_USER= +set TARGET_REGISTRY_DOMAIN= +set GITEA_AUTH_TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 24e7279..b04e842 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ # Environment .env +.env.bat # node modules diff --git a/.yarnrc.yml b/.yarnrc.yml index 8d6e5fe..73567e0 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,9 +1,9 @@ -# So basically, we want to selectively download packages from the Gitea repository but still allow the +# So basically, we want to selectively download packages from the Gitea repository but still allow the # main repositories, so we are going to have to scope our packages properly. npmScopes: tornado: - # Since there can be multiple repositories we select them via the .env we `source``. - # Check .env.example + # Since there can be multiple repositories we select them via the .env we use `source .env` on Linux or `cmd.exe /c .env.bat` on Windows. + # Check .env.example or .env.example.bat npmRegistryServer: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ npmPublishRegistry: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ diff --git a/package.json b/package.json index 9ec8d15..0cac669 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,10 @@ "@tornado/*" ], "scripts": { + "install:linux": "source .env && yarn", + "install:windows": "call .env.bat && yarn", + "git:publish:linux": "source .env && yarn workspaces foreach npm publish", + "git:publish:windows": "call .env.bat && yarn workspaces foreach npm publish", "git:status": "ls -1 @tornado | xargs -I repl git -C @tornado/repl status", "git:add": "ls -1 @tornado | xargs -I repl git -C @tornado/repl add .", "git:commit": "ls -1 @tornado | xargs -I repl git -C @tornado/repl commit -sm ",