Skip to content

Commit bd5b41f

Browse files
committed
added post pushing tasks
1 parent e463076 commit bd5b41f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

jekyll-site-builder.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import time
23

34
def jekyll_builder(cwd):
45
#asks for build no
@@ -42,13 +43,25 @@ def repo_handler(build_no, comm_message):
4243
print("\n * _site/ folder exists, deleting the folder......" + "\n-------------------------")
4344
os.system("rm -rf ./_site")
4445
print("\n * _site/ deleted" + "\n-------------------------\n")
46+
else:
47+
print("\n * _site/ folder does not exist" + "\n-------------------------\n\n")
4548

4649
os.system("git addcomm -m \"Build No.: "+build_no+" :: "+comm_message+" | part 2\"")
4750
print("\n\n")
4851

4952
print("\n * Pushing to GitHub" + "\n-------------------------")
5053
os.system("git push origin master")
54+
#time.sleep(3)
5155

56+
if(os.path.isdir("./_site/")):
57+
print("\n * _site/ folder exists, deleting the folder......" + "\n-------------------------")
58+
os.system("rm -rf ./_site")
59+
print("\n * _site/ deleted" + "\n-------------------------\n")
60+
else:
61+
print("\n * _site/ folder does not exist" + "\n-------------------------\n\n")
62+
63+
print("\n * switching back to jekyll branch" + "\n-------------------------\n\n")
64+
os.system("git checkout master")
5265

5366
if __name__ == '__main__':
5467
cwd = os.getcwd()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy