summaryrefslogtreecommitdiff
path: root/.vscode/tasks.json
blob: 89a35fb7fd65a93cf6cbc87a4e851d1b74c7e5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
    "version": "2.0.0",
    "tasks": [
        // OTHER
        {
            "label": "checkforsettings",
            "type": "shell",
            "group": "none",
            "detail": "Check that settings.json has been created",
            "command": "bash -c ${workspaceFolder}/.vscode/config.sh",
            "problemMatcher": []
        },
        // BUILD
        {
            "label": "pnpmsetup",
            "type": "shell",
            "group": "build",
            "detail": "Setup pnpm",
            "command": "pnpm i",
            "problemMatcher": []
        },
        {
            "label": "updatefrontendlib",
            "type": "shell",
            "group": "build",
            "detail": "Update deck-frontend-lib",
            "command": "pnpm update decky-frontend-lib --latest",
            "problemMatcher": []
        },
        {
            "label": "build",
            "type": "npm",
            "group": "build",
            "detail": "rollup -c",
            "script": "build",
            "path": "",
            "problemMatcher": []
        },
        {
            "label": "buildall",
            "group": "build",
            "detail": "Build decky-plugin-template",
            "dependsOrder": "sequence",
            "dependsOn": [
                "pnpmsetup",
                "build"
            ],
            "problemMatcher": []
        },
        // DEPLOY
        {
            "label": "createfolders",
            "detail": "Create plugins folder in expected directory",
            "type": "shell",
            "group": "none",
            "dependsOn": [
                "checkforsettings"
            ],
            "command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'mkdir -p ${config:deckdir}/homebrew/dev/pluginloader && mkdir -p ${config:deckdir}/homebrew/dev/plugins'",
            "problemMatcher": []
        },
        {
            "label": "deploy",
            "detail": "Deploy dev plugin to deck",
            "type": "shell",
            "group": "none",
            "dependsOn": [
                "createfolders"
            ],
            "command": "rsync -azp --delete --rsh='ssh -p ${config:deckport} ${config:deckkey}' --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='node_modules/' --exclude='src/' --exclude='*.log' --exclude='.gitignore' . deck@${config:deckip}:${config:deckdir}/homebrew/dev/plugins/${workspaceFolderBasename}",
            "problemMatcher": []
        },
        {
            "label": "chmodfolders",
            "detail": "chmods folders to prevent perms issues",
            "type": "shell",
            "group": "none",
            "command": "ssh deck@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo '${config:deckpass}' | sudo -S chmod -R ug+rw ${config:deckdir}/homebrew/dev/'",
            "problemMatcher": []
        },
        {
            "label": "deployall",
            "dependsOrder": "sequence",
            "group": "none",
            "dependsOn": [
                "deploy",
                "chmodfolders"
            ],
            "problemMatcher": []
        },
        // ALL-IN-ONE
        {
            "label": "allinone",
            "detail": "Build and deploy",
            "dependsOrder": "sequence",
            "group": "test",
            "dependsOn": [
                "buildall",
                "deployall"
            ],
            "problemMatcher": []
        }
    ]
}