Changed run tasks behavior
This commit is contained in:
parent
e631d1717e
commit
3bab4faa46
40
.vscode/tasks.json
vendored
40
.vscode/tasks.json
vendored
@ -29,8 +29,8 @@
|
|||||||
"dependsOn": ["Clean up"]
|
"dependsOn": ["Clean up"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Run (Python)",
|
"label": "Run (Python) [Dirty]",
|
||||||
"detail": "Copy source code from 'src' dir into 'testpython' and start main.py within venv",
|
"detail": "Remove all cache files and start main.py within venv",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"windows": {
|
"windows": {
|
||||||
"command": "./.vscode/tasks/windows/run_python.bat"
|
"command": "./.vscode/tasks/windows/run_python.bat"
|
||||||
@ -43,10 +43,27 @@
|
|||||||
"isDefault": true
|
"isDefault": true
|
||||||
},
|
},
|
||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
|
"dependsOn": ["Clean up"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Run (Python) [Clean]",
|
||||||
|
"detail": "Needs to be ran before the dirty version can be used. Copy source code from 'src' dir into 'testpython', install requirements and start main.py within venv",
|
||||||
|
"type": "shell",
|
||||||
|
"windows": {
|
||||||
|
"command": "./.vscode/tasks/windows/flush_and_run_python.bat"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "bash ./.vscode/tasks/linux/flush_and_run_python.sh"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "test",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"problemMatcher": [],
|
||||||
"dependsOn": ["Clean up", "Install requirements"]
|
"dependsOn": ["Clean up", "Install requirements"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Run (Binary)",
|
"label": "Run (Binary) [Dirty]",
|
||||||
"detail": "Copy compiled binaries from 'dest/%os%' dir into 'testbinary/%os%' and start it",
|
"detail": "Copy compiled binaries from 'dest/%os%' dir into 'testbinary/%os%' and start it",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"windows": {
|
"windows": {
|
||||||
@ -62,6 +79,23 @@
|
|||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"dependsOn": ["Build"]
|
"dependsOn": ["Build"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Run (Binary) [Clean]",
|
||||||
|
"detail": "Needs to be ran before the dirty version can be used. Copy compiled binaries from 'dest/%os%' dir into 'testbinary/%os%' and start it",
|
||||||
|
"type": "shell",
|
||||||
|
"windows": {
|
||||||
|
"command": "./.vscode/tasks/windows/flush_and_run_binary.bat"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"command": "bash ./.vscode/tasks/linux/flush_and_run_binary.sh"
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "test",
|
||||||
|
"isDefault": false
|
||||||
|
},
|
||||||
|
"problemMatcher": [],
|
||||||
|
"dependsOn": ["Build"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Configure Setup",
|
"label": "Configure Setup",
|
||||||
"detail": "Configure IF setup file on Windows and .deb package on Linux",
|
"detail": "Configure IF setup file on Windows and .deb package on Linux",
|
||||||
|
12
.vscode/tasks/linux/flush_and_run_binary.sh
vendored
Normal file
12
.vscode/tasks/linux/flush_and_run_binary.sh
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf ./testbinary/linux
|
||||||
|
mkdir ./testbinary/linux
|
||||||
|
|
||||||
|
cp -r ./dist/linux/* ./testbinary/linux/
|
||||||
|
|
||||||
|
cd "testbinary/linux/"
|
||||||
|
|
||||||
|
chmod +x "StardewSync"
|
||||||
|
|
||||||
|
"./StardewSync"
|
8
.vscode/tasks/linux/flush_and_run_python.sh
vendored
Normal file
8
.vscode/tasks/linux/flush_and_run_python.sh
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf testpython
|
||||||
|
mkdir testpython
|
||||||
|
|
||||||
|
cp -r ./src/* ./testpython/
|
||||||
|
|
||||||
|
source venv/bin/activate && cd ./testpython && python ./main.py && deactivate
|
5
.vscode/tasks/linux/run_binary.sh
vendored
5
.vscode/tasks/linux/run_binary.sh
vendored
@ -1,10 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
rm -rf ./testbinary/linux
|
|
||||||
mkdir ./testbinary/linux
|
|
||||||
|
|
||||||
cp -r ./dist/linux/* ./testbinary/linux/
|
|
||||||
|
|
||||||
cd "testbinary/linux/"
|
cd "testbinary/linux/"
|
||||||
|
|
||||||
chmod +x "StardewSync"
|
chmod +x "StardewSync"
|
||||||
|
5
.vscode/tasks/linux/run_python.sh
vendored
5
.vscode/tasks/linux/run_python.sh
vendored
@ -1,8 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
rm -rf testpython
|
|
||||||
mkdir testpython
|
|
||||||
|
|
||||||
cp -r ./src/* ./testpython/
|
|
||||||
|
|
||||||
source venv/bin/activate && cd ./testpython && python ./main.py && deactivate
|
source venv/bin/activate && cd ./testpython && python ./main.py && deactivate
|
7
.vscode/tasks/windows/flush_and_run_binary.bat
vendored
Normal file
7
.vscode/tasks/windows/flush_and_run_binary.bat
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
rmdir /S /Q testbinary\windows
|
||||||
|
mkdir testbinary\windows
|
||||||
|
|
||||||
|
xcopy ".\dist\windows\" ".\testbinary\windows\" /h /i /c /k /e /r /y
|
||||||
|
|
||||||
|
cd ".\testbinary\windows\StardewSync"
|
||||||
|
".\StardewSync.exe"
|
6
.vscode/tasks/windows/flush_and_run_python.bat
vendored
Normal file
6
.vscode/tasks/windows/flush_and_run_python.bat
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
rmdir /S /Q testpython
|
||||||
|
mkdir testpython
|
||||||
|
|
||||||
|
xcopy ".\src\" ".\testpython\" /h /i /c /k /e /r /y
|
||||||
|
|
||||||
|
venv\Scripts\activate && cd .\testpython && python .\main.py && deactivate
|
5
.vscode/tasks/windows/run_binary.bat
vendored
5
.vscode/tasks/windows/run_binary.bat
vendored
@ -1,7 +1,2 @@
|
|||||||
rmdir /S /Q testbinary\windows
|
|
||||||
mkdir testbinary\windows
|
|
||||||
|
|
||||||
xcopy ".\dist\windows\" ".\testbinary\windows\" /h /i /c /k /e /r /y
|
|
||||||
|
|
||||||
cd ".\testbinary\windows\StardewSync"
|
cd ".\testbinary\windows\StardewSync"
|
||||||
".\StardewSync.exe"
|
".\StardewSync.exe"
|
5
.vscode/tasks/windows/run_python.bat
vendored
5
.vscode/tasks/windows/run_python.bat
vendored
@ -1,6 +1 @@
|
|||||||
rmdir /S /Q testpython
|
|
||||||
mkdir testpython
|
|
||||||
|
|
||||||
xcopy ".\src\" ".\testpython\" /h /i /c /k /e /r /y
|
|
||||||
|
|
||||||
venv\Scripts\activate && cd .\testpython && python .\main.py && deactivate
|
venv\Scripts\activate && cd .\testpython && python .\main.py && deactivate
|
Loading…
Reference in New Issue
Block a user