This repository has been archived by the owner on Aug 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lukasz.czaplinski
committed
Nov 18, 2019
1 parent
bc97d3f
commit 870b4d4
Showing
5 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns resume.gh-pages | ||
(:require [clojure.string :as str] | ||
[clojure.java.shell :as shell])) | ||
|
||
|
||
(defn- sh! [& args] | ||
(let [cmd-result (apply shell/sh args) | ||
{exit :exit | ||
err :err} cmd-result] | ||
(if (= 0 exit) | ||
cmd-result | ||
(throw (Exception. (str "invocation of '" args "' failed with " err)))))) | ||
|
||
(defn deploy | ||
"Deploy current artifacts to gh-pages branch" | ||
[] | ||
(let [git-tag (-> (sh! "git" "describe" "--tags") :out str/trim)] | ||
(sh! "git" "checkout" "gh-pages") | ||
(sh! "mv" "target/dist/resume.html" "index.html") | ||
(sh! "git" "add" "index.html") | ||
(sh! "git" "commit" "-m" (str "release: " git-tag)) | ||
(sh! "git" "push" "origin" "gh-pages"))) |