Skip to content

Commit 65989f9

Browse files
author
Sergej Popov [Contractor]
committed
ci
1 parent 7065926 commit 65989f9

File tree

9 files changed

+188
-172
lines changed

9 files changed

+188
-172
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ build/
88
dist/
99
uploads/
1010
node_modules/
11+
12+
secrets.json

.vscode/tasks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
"type": "npm",
4949
"script": "build-watch-sp",
5050
"problemMatcher": []
51+
},
52+
{
53+
"type": "npm",
54+
"script": "zip-am",
55+
"problemMatcher": []
56+
},
57+
{
58+
"type": "npm",
59+
"script": "zip-sp",
60+
"problemMatcher": []
5161
}
5262
]
5363
}

ci.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import * as fs from "fs-extra";
2+
3+
export interface IConfig {
4+
googleApi: {
5+
refreshToken: string;
6+
clientSecret: string;
7+
clientId: string;
8+
spotifyAppIs: string;
9+
amazonMusicAppId: string;
10+
},
11+
github: {
12+
token: string;
13+
}
14+
}
15+
16+
17+
export const getConfig = async () => {
18+
const json = await fs.readFile("./secrets.json", "utf-8");
19+
return JSON.parse(json) as IConfig;
20+
};
21+
22+
export const getVersion = async (): Promise<string> => {
23+
const json = await fs.readFile("src/spotify/manifest.json", "utf-8");
24+
const manifest = JSON.parse(json);
25+
return manifest.version;
26+
};

0 commit comments

Comments
 (0)