From f6cb2c4faca482edf8643e25df03baf697547432 Mon Sep 17 00:00:00 2001 From: Mihajlo Date: Thu, 15 Jul 2021 10:41:10 +0200 Subject: [PATCH 1/4] chore: sasjs-tests windows --- sasjs-tests/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/sasjs-tests/package.json b/sasjs-tests/package.json index 737ab7b..004e3eb 100644 --- a/sasjs-tests/package.json +++ b/sasjs-tests/package.json @@ -24,6 +24,7 @@ "eject": "react-scripts eject", "update:adapter": "cd .. && npm run package:lib && cd sasjs-tests && npm i ../build/sasjs-adapter-5.0.0.tgz", "deploy:tests": "rsync -avhe ssh ./build/* --delete $SSH_ACCOUNT:$DEPLOY_PATH", + "deploy:tests-win": "scp %DEPLOY_PATH% ./build/*", "deploy": "npm run update:adapter && npm run build && npm run deploy:tests" }, "eslintConfig": { From 8a0f14b780dd85940572ac41e87f4a4ac1a6dba2 Mon Sep 17 00:00:00 2001 From: Mihajlo Date: Thu, 15 Jul 2021 10:43:30 +0200 Subject: [PATCH 2/4] chore: windows fallback --- sasjs-tests/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sasjs-tests/package.json b/sasjs-tests/package.json index 004e3eb..64d2331 100644 --- a/sasjs-tests/package.json +++ b/sasjs-tests/package.json @@ -23,7 +23,7 @@ "test": "react-scripts test", "eject": "react-scripts eject", "update:adapter": "cd .. && npm run package:lib && cd sasjs-tests && npm i ../build/sasjs-adapter-5.0.0.tgz", - "deploy:tests": "rsync -avhe ssh ./build/* --delete $SSH_ACCOUNT:$DEPLOY_PATH", + "deploy:tests": "rsync -avhe ssh ./build/* --delete $SSH_ACCOUNT:$DEPLOY_PATH || npm run deploy:tests-win", "deploy:tests-win": "scp %DEPLOY_PATH% ./build/*", "deploy": "npm run update:adapter && npm run build && npm run deploy:tests" }, From d2a90c77fdb1f773769b3ccf137df4729714730c Mon Sep 17 00:00:00 2001 From: Mihajlo Date: Thu, 15 Jul 2021 10:57:44 +0200 Subject: [PATCH 3/4] chore: readme update --- sasjs-tests/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sasjs-tests/README.md b/sasjs-tests/README.md index 9ae629f..471dcf4 100644 --- a/sasjs-tests/README.md +++ b/sasjs-tests/README.md @@ -41,6 +41,15 @@ So you can run the script like so: SSH_ACCOUNT=me@my-sas-server.com DEPLOY_PATH=/var/www/html/my-folder/sasjs-tests npm run deploy ``` +If you are on `WINDOWS`, you will first need to install one dependency: +```bash +npm i -g copyfiles +``` +and then run: +```bash +npm run deploy --DEPLOY_PATH me@my-sas-server.com:/var/www/html/my-folder/sasjs-tests +``` + If you'd like to deploy just `sasjs-tests` without changing the adapter version, you can use the `deploy:tests` script, while also setting the same environment variables as above. ## 3. Creating the required SAS services From d38d032309961f17d9af84de87002d794c09d730 Mon Sep 17 00:00:00 2001 From: Mihajlo Date: Thu, 15 Jul 2021 13:01:12 +0200 Subject: [PATCH 4/4] chore: readme updates --- sasjs-tests/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sasjs-tests/README.md b/sasjs-tests/README.md index 471dcf4..6296cfe 100644 --- a/sasjs-tests/README.md +++ b/sasjs-tests/README.md @@ -45,9 +45,13 @@ If you are on `WINDOWS`, you will first need to install one dependency: ```bash npm i -g copyfiles ``` -and then run: +and then run to build: ```bash -npm run deploy --DEPLOY_PATH me@my-sas-server.com:/var/www/html/my-folder/sasjs-tests +npm run update:adapter && npm run build +``` +when it finishes run to deploy: +```bash +scp -rp ./build/* me@my-sas-server.com:/var/www/html/my-folder/sasjs-tests ``` If you'd like to deploy just `sasjs-tests` without changing the adapter version, you can use the `deploy:tests` script, while also setting the same environment variables as above.