diff options
Diffstat (limited to 'gulpfile.babel.js')
| -rw-r--r-- | gulpfile.babel.js | 4 |
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)) |
