Skip to content

Commit 71f78ae

Browse files
committed
built a script to push changes to github
1 parent c41d1c1 commit 71f78ae

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

jekyll-site-builder.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import os
2+
3+
def jekyll_builder(cwd):
4+
#asks for build no
5+
#asks for commit message
6+
#creates a ../temp folder
7+
#builds site inside that folder
8+
9+
build_no = input("Enter the build number\t")
10+
comm_message = input("Describe your changes\t")
11+
12+
os.system("mkdir "+cwd+"/../temp/")
13+
os.system("bundle exec jekyll build -d ../temp/")
14+
repo_handler(build_no, comm_message)
15+
16+
def repo_handler(build_no, comm_message):
17+
#checks out to master branch
18+
#rm -rf everything inside
19+
#commits with build no and message and appends p1
20+
#copies stuff in ../temp to current dir
21+
#deletes _site/ folder if created
22+
#commits with build no and message and appends p2
23+
#pushes to github
24+
25+
os.system("git checkout master")
26+
os.system("rm -rf ./*")
27+
os.system("git addcomm -m \""+build_no+" : "+comm_message+" | part 1\"")
28+
os.system("cp -r ../temp/* ./")
29+
os.system("git addcomm -m \""+build_no+" : "+comm_message+" | part 2\"")
30+
os.system("git push origin master")
31+
32+
33+
if __name__ == '__main__':
34+
cwd = os.getcwd()
35+
jekyll_builder(cwd)

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