Go back to hashes
This commit is contained in:
parent
aca2010621
commit
5d9de576aa
|
@ -8,7 +8,7 @@ git:
|
|||
|
||||
branches:
|
||||
only:
|
||||
- stable
|
||||
- development
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
@ -25,6 +25,6 @@ deploy:
|
|||
keep_history: true
|
||||
local_dir: .
|
||||
name: BetterDiscord Deployment
|
||||
target_branch: gh-pages
|
||||
target_branch: gh-pages-development
|
||||
on:
|
||||
branch: stable
|
||||
branch: development
|
|
@ -46,8 +46,8 @@ export default new class Core {
|
|||
{
|
||||
name: "bd-stylesheet",
|
||||
type: "style",
|
||||
url: "https://rauenzi.github.io/BetterDiscordApp/dist/style.css",
|
||||
backup: "https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/dist/style.css",
|
||||
url: "//cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/{{hash}}/dist/style.css",
|
||||
backup: "https://rauenzi.github.io/BetterDiscordApp/dist/style.css",
|
||||
localPath: "style.css"
|
||||
}
|
||||
];
|
||||
|
@ -131,14 +131,14 @@ export default new class Core {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
const url = Utilities.formatString(data.url, {repo: Config.repo, hash: Config.hash});
|
||||
const url = Utilities.formatString(data.url, {hash: Config.hash});
|
||||
Logger.log(`Startup`, `Loading Resource (${url})`);
|
||||
const injector = (data.type == "script" ? DOMManager.injectScript : DOMManager.linkStyle).bind(DOMManager);
|
||||
try {
|
||||
await injector(data.name, url);
|
||||
}
|
||||
catch (err) {
|
||||
const backup = Utilities.formatString(data.backup, {minified: Config.minified ? ".min" : ""});
|
||||
const backup = Utilities.formatString(data.backup);
|
||||
Logger.stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err);
|
||||
try {
|
||||
await injector(data.name, backup);
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import {Config} from "data";
|
||||
import Logger from "./logger";
|
||||
import DOM from "./domtools";
|
||||
|
||||
export default class Utilities {
|
||||
|
||||
static repoUrl(path) {
|
||||
return `https://gitcdn.xyz/repo/rauenzi/BetterDiscordApp/gh-pages/${path}`;
|
||||
return `https://cdn.staticaly.com/gh/rauenzi/BetterDiscordApp/${Config.hash}/${path}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue