-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
85 lines (62 loc) · 2.45 KB
/
build.py
File metadata and controls
85 lines (62 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
"""
Commitify - Fake Commit Generator for GitHub
Copyright (C) 2024-2024 Liam Arguedas
This file is part of Commitify, a free CLI tool designed to generate fake commits
for GitHub repositories.
Commitify is distributed under the terms of the GNU General Public License (GPL),
either version 3 of the License, or any later version.
Commitify is provided "as is", without warranty of any kind, express or implied,
including but not limited to the warranties of merchantability, fitness for a
particular purpose, and noninfringement. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
Commitify. If not, see <https://www.gnu.org/licenses/>.
"""
import platform
import os
import sys
from pathlib import Path
from build import WinBuilt
from build import CommitifyConfig
WINDOWS = "Windows"
LINUX = "Linux"
MACOS = "Darwin"
COMMITIFY = Path(__file__).parents[0]
def main():
print("========= COMMITIFY =========")
print("SETUP: Installing Requirements...")
install_requirements()
config = CommitifyConfig()
print("SETTINGS: Commitify configuration")
repo = config.ask_configs(return_repo_info=True)
if user_system_using(WINDOWS):
print("BUILDING: Building Commitify for Windows")
builder = WinBuilt()
print("BUILDING: Creating Root Files")
builder.set_root()
print("BUILDING: Creating Git Configuration Files")
builder.create_git_bat(repo)
print("BUILDING: Creating Startup Files")
builder.create_startup_script()
print("BUILDING: Moving Commitify to Root")
builder.move_files()
print("BUILDING: Initializing Git")
builder.config_repo()
if user_system_using(LINUX):
sys.exit(1) # Kill terminal while in-dev
if user_system_using(MACOS):
sys.exit(1) # Kill terminal while in-dev
print("DONE: Commitify Completed")
print("Commitify will automatically run each time your computer starts up.")
print("For more information visit: https://github.com/liamarguedas/Commitify")
def user_system_using(user_os):
return platform.system() == user_os
def install_requirements():
try:
os.system("pip install -r ./requirements/requirements.txt ")
print("SETUP: Requirements Installed")
except Exception as e:
print(e)
print("ERROR: Could not install requirements, please install manually")
if __name__ == "__main__":
main()