aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Biilmann Christensen <info@mathias-biilmann.net>2017-02-21 17:41:53 -0800
committerMathias Biilmann Christensen <info@mathias-biilmann.net>2017-02-21 17:41:53 -0800
commit93e82e315f57fe04e7e6cae34837cc9940792229 (patch)
treee586417b90c09af619969fc6155e92e86a2c0a42
parent1f36a552a056908da916d814dd9e7ac2f1daf150 (diff)
Better matching of repo url
-rw-r--r--gulpfile.babel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index 3d214b8..7d498fe 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -23,8 +23,8 @@ gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture
gulp.task("cms", () => {
const match = process.env.REPOSITORY_URL ? process.env.REPOSITORY_URL : cp.execSync("git remote -v", {encoding: "utf-8"});
let repo = null;
- match.replace(/github.com:(.+?)\.git/, (_, m) => {
- repo = m;
+ match.replace(/github.com:(\S+)(\.git)?/, (_, m) => {
+ repo = m.replace(/\.git$/, "");
});
gulp.src("./src/cms/*")
.pipe(replace("<% GITHUB_REPOSITORY %>", repo))