Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergej Popov [Contractor] committed Feb 10, 2019
1 parent 7065926 commit 65989f9
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 172 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ build/
dist/
uploads/
node_modules/

secrets.json
10 changes: 10 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@
"type": "npm",
"script": "build-watch-sp",
"problemMatcher": []
},
{
"type": "npm",
"script": "zip-am",
"problemMatcher": []
},
{
"type": "npm",
"script": "zip-sp",
"problemMatcher": []
}
]
}
26 changes: 26 additions & 0 deletions ci.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as fs from "fs-extra";

export interface IConfig {
googleApi: {
refreshToken: string;
clientSecret: string;
clientId: string;
spotifyAppIs: string;
amazonMusicAppId: string;
},
github: {
token: string;
}
}


export const getConfig = async () => {
const json = await fs.readFile("./secrets.json", "utf-8");
return JSON.parse(json) as IConfig;
};

export const getVersion = async (): Promise<string> => {
const json = await fs.readFile("src/spotify/manifest.json", "utf-8");
const manifest = JSON.parse(json);
return manifest.version;
};
Loading

0 comments on commit 65989f9

Please sign in to comment.