File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
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 )
You can’t perform that action at this time.
0 commit comments