fix article and script
This commit is contained in:
parent
cbcff38c99
commit
2a6f814c6d
|
@ -20,9 +20,9 @@ handleShellFailed (ShellFailed cmdLine _) = do
|
||||||
echo $ ("[FAILED]: " <> unsafeTextToLine cmdLine)
|
echo $ ("[FAILED]: " <> unsafeTextToLine cmdLine)
|
||||||
setSGR [Reset]
|
setSGR [Reset]
|
||||||
handleProcFailed :: ProcFailed -> IO ()
|
handleProcFailed :: ProcFailed -> IO ()
|
||||||
handleProcFailed (ProcFailed procCommand procArgs _) = do
|
handleProcFailed (ProcFailed procCmd procArgs _) = do
|
||||||
setSGR [SetColor Foreground Dull Red]
|
setSGR [SetColor Foreground Dull Red]
|
||||||
echo $ unsafeTextToLine ("[FAILED]: " <> procCommand <> (mconcat procArgs))
|
echo $ unsafeTextToLine ("[FAILED]: " <> procCmd <> (mconcat procArgs))
|
||||||
setSGR [Reset]
|
setSGR [Reset]
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,9 +39,10 @@ mainProc = do
|
||||||
debug $ unsafeTextToLine $ "cd " <> (format fp pubdir)
|
debug $ unsafeTextToLine $ "cd " <> (format fp pubdir)
|
||||||
cd pubdir
|
cd pubdir
|
||||||
pwd >>= echo . unsafeTextToLine . format fp
|
pwd >>= echo . unsafeTextToLine . format fp
|
||||||
|
dshells "rm -rf .git"
|
||||||
dshells "git init ."
|
dshells "git init ."
|
||||||
dshell ("git remote add upstream " <> mainRepository)
|
dshell ("git remote add upstream " <> mainRepository)
|
||||||
dshells "git fetch upstream"
|
dshells "git fetch --depth 1 upstream gh-pages"
|
||||||
dshells "git reset upstream/gh-pages"
|
dshells "git reset upstream/gh-pages"
|
||||||
dshells "git add -A ."
|
dshells "git add -A ."
|
||||||
echo "Commit and publish"
|
echo "Commit and publish"
|
||||||
|
@ -49,15 +50,18 @@ mainProc = do
|
||||||
echo "Don't `git push` this time"
|
echo "Don't `git push` this time"
|
||||||
dshells "git push -q upstream HEAD:gh-pages"
|
dshells "git push -q upstream HEAD:gh-pages"
|
||||||
|
|
||||||
|
debug :: Line -> IO ()
|
||||||
debug txt = do
|
debug txt = do
|
||||||
setSGR [SetColor Foreground Dull Yellow]
|
setSGR [SetColor Foreground Dull Yellow]
|
||||||
echo txt
|
echo txt
|
||||||
setSGR [Reset]
|
setSGR [Reset]
|
||||||
|
|
||||||
|
dshells :: Text -> IO ()
|
||||||
dshells x = do
|
dshells x = do
|
||||||
debug $ unsafeTextToLine x
|
debug $ unsafeTextToLine x
|
||||||
shells x empty
|
shells x empty
|
||||||
|
|
||||||
|
dshell :: Text -> IO ExitCode
|
||||||
dshell x = do
|
dshell x = do
|
||||||
debug $ unsafeTextToLine x
|
debug $ unsafeTextToLine x
|
||||||
shell x empty
|
shell x empty
|
||||||
|
@ -69,6 +73,7 @@ checkDir = do
|
||||||
then exit (ExitFailure 1)
|
then exit (ExitFailure 1)
|
||||||
else return "_site"
|
else return "_site"
|
||||||
|
|
||||||
|
mainRepository :: Text
|
||||||
mainRepository = "git@github.com:yogsototh/yannesposito.com.git"
|
mainRepository = "git@github.com:yogsototh/yannesposito.com.git"
|
||||||
|
|
||||||
cloneIfNeeded :: FilePath -> IO ()
|
cloneIfNeeded :: FilePath -> IO ()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#+description: The filmography is magistral, as well as the soundtrack,
|
#+description: The filmography is magistral, as well as the soundtrack,
|
||||||
#+description: acting, and overall atmosphere.
|
#+description: acting, and overall atmosphere.
|
||||||
#+description: I really urge you to at least take a look at the opening scene.
|
#+description: I really urge you to at least take a look at the opening scene.
|
||||||
#+keywords: blog static
|
#+keywords: tv-show
|
||||||
#+author: Yann Esposito
|
#+author: Yann Esposito
|
||||||
#+email: yann@esposito.host
|
#+email: yann@esposito.host
|
||||||
#+date: [2021-06-01 Tue]
|
#+date: [2021-06-01 Tue]
|
||||||
|
|
Loading…
Reference in a new issue