Add install/publish commands for Windows

This commit is contained in:
Theo 2023-05-17 10:35:08 +03:00
parent 21fc07617c
commit 55fc28dacf
4 changed files with 11 additions and 3 deletions

3
.env.bat.example Normal file

@ -0,0 +1,3 @@
set TARGET_REGISTRY_USER=
set TARGET_REGISTRY_DOMAIN=
set GITEA_AUTH_TOKEN=

1
.gitignore vendored

@ -11,6 +11,7 @@
# Environment # Environment
.env .env
.env.bat
# node modules # node modules

@ -2,8 +2,8 @@
# main repositories, so we are going to have to scope our packages properly. # main repositories, so we are going to have to scope our packages properly.
npmScopes: npmScopes:
tornado: tornado:
# Since there can be multiple repositories we select them via the .env we `source``. # 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 # Check .env.example or .env.example.bat
npmRegistryServer: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ npmRegistryServer: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/
npmPublishRegistry: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/ npmPublishRegistry: https://${TARGET_REGISTRY_DOMAIN}/api/packages/${TARGET_REGISTRY_USER}/npm/

@ -6,6 +6,10 @@
"@tornado/*" "@tornado/*"
], ],
"scripts": { "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: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: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 ", "git:commit": "ls -1 @tornado | xargs -I repl git -C @tornado/repl commit -sm ",