NikGapps 3.15__tar.gz → 3.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitlabManager.py +27 -11
- {nikgapps-3.15 → nikgapps-3.17/NikGapps.egg-info}/PKG-INFO +1 -1
- {nikgapps-3.15/NikGapps.egg-info → nikgapps-3.17}/PKG-INFO +1 -1
- {nikgapps-3.15 → nikgapps-3.17}/setup.py +1 -1
- {nikgapps-3.15 → nikgapps-3.17}/LICENSE +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/MANIFEST.in +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/Build.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsManager.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsOverlays.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/NikGappsPackages.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/PackageConstants.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/Release.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/build_config.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/cache.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config/NikGappsConfig.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/config_upload.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/copy_repos.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/AppSet.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Args.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Assets.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/B64.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/C.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Cmd.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Config.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/ConfigObj.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/FileOp.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Json.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/P.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Package.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/Statics.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/SystemStat.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/T.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/XmlOp.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/NikGappsZipSigner.jar +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/addon.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/apksigner.jar +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/apktool_2.9.3.jar +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/appsets.json +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Darwin/aapt2 +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/aapt2 +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/dex-tools-2.2-SNAPSHOT-2021-10-31.zip +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Linux/jd-gui-1.6.6-min.jar +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/AdbWinApi.dll +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/AdbWinUsbApi.dll +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt.exe +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt2.exe +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/aapt_64.exe +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/bin/Windows/adb.exe +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/busybox +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/cert.pk8 +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/cert.x509.pem +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/changelogs.yaml +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/config_versions.json +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/customize.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/debloater.config +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/functions.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/gofile.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/header.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/installer.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/magisk-update-binary.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/module.prop +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/mount.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/mtg_mount.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/nikgapps.config +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/nikgapps_functions.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/packages.json +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/private_key.pem +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/uninstaller.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/unmount.sh +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/assets/update-binary-busybox +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/CompOps.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Export.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Modes.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Tar.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Zip.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/Zsh.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/compression/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/Git.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitOperations.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GitStatics.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/GithubManager.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/TestGit.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/git/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/ApkMetaInfo.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Bool.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Library.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Manifest.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Overlay.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/Resources.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/String.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/StringArray.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/overlay/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/CmdUpload.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/GoFileUpload.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/Upload.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/upload/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/Requests.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/TelegramApi.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/helper/web/__init__.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/main.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/overlay_control.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps/test.py +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/SOURCES.txt +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/dependency_links.txt +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/entry_points.txt +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/requires.txt +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/NikGapps.egg-info/top_level.txt +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/README.md +0 -0
- {nikgapps-3.15 → nikgapps-3.17}/setup.cfg +0 -0
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
import gitlab
|
|
7
7
|
|
|
8
8
|
from NikGapps.helper.FileOp import FileOp
|
|
9
|
+
from NikGapps.helper.P import P
|
|
9
10
|
from NikGapps.helper.Statics import Statics
|
|
10
11
|
from NikGapps.helper.git.GitOperations import GitOperations
|
|
11
12
|
|
|
@@ -29,6 +30,21 @@ class GitLabManager:
|
|
|
29
30
|
self.create_and_commit_readme(project_id=project.id)
|
|
30
31
|
return project
|
|
31
32
|
|
|
33
|
+
def create_lfs_repository(self, project_name, provide_owner_access=False, user_id=8064473, visibility='public',
|
|
34
|
+
extn_list=None):
|
|
35
|
+
"""Creates a new repository with the given project name and attributes."""
|
|
36
|
+
if extn_list is None:
|
|
37
|
+
extn_list = []
|
|
38
|
+
project = self.gl.projects.create({'name': project_name, 'visibility': visibility})
|
|
39
|
+
if provide_owner_access:
|
|
40
|
+
self.provide_owner_access(project_id=project.id, user_id=user_id)
|
|
41
|
+
self.create_and_commit_readme(project_id=project.id)
|
|
42
|
+
gitattributes = ""
|
|
43
|
+
for extn in extn_list:
|
|
44
|
+
gitattributes += f"*.{extn} filter=lfs diff=lfs merge=lfs -text\n"
|
|
45
|
+
self.create_and_commit_file(project_id=project.id, file_path=".gitattributes", content=gitattributes)
|
|
46
|
+
return project
|
|
47
|
+
|
|
32
48
|
def provide_owner_access(self, project_id, user_id):
|
|
33
49
|
"""Provides owner access to a repository for a particular user."""
|
|
34
50
|
project = self.gl.projects.get(project_id)
|
|
@@ -36,7 +52,7 @@ class GitLabManager:
|
|
|
36
52
|
'user_id': user_id,
|
|
37
53
|
'access_level': 50
|
|
38
54
|
})
|
|
39
|
-
|
|
55
|
+
P.green(f"Owner access provided to user with ID {user_id}.")
|
|
40
56
|
return member
|
|
41
57
|
|
|
42
58
|
def get_project(self, project_name):
|
|
@@ -64,8 +80,8 @@ class GitLabManager:
|
|
|
64
80
|
]
|
|
65
81
|
}
|
|
66
82
|
commit = project.commits.create(commit_data)
|
|
67
|
-
|
|
68
|
-
print(commit)
|
|
83
|
+
P.green(f"README.md created and committed to the repository {project.name}.")
|
|
84
|
+
# print(commit)
|
|
69
85
|
return commit
|
|
70
86
|
|
|
71
87
|
def create_and_commit_file(self, project_id, branch_name="main", file_path="file.txt", content=""):
|
|
@@ -83,8 +99,8 @@ class GitLabManager:
|
|
|
83
99
|
]
|
|
84
100
|
}
|
|
85
101
|
commit = project.commits.create(commit_data)
|
|
86
|
-
|
|
87
|
-
print(commit)
|
|
102
|
+
P.green(f"{file_path} created and committed to the repository {project.name}.")
|
|
103
|
+
# print(commit)
|
|
88
104
|
return commit
|
|
89
105
|
|
|
90
106
|
def create_gitlab_repository(self, project_name, visibility='public'):
|
|
@@ -147,13 +163,13 @@ class GitLabManager:
|
|
|
147
163
|
new_repo_name = f"{repo_name}_{time.strftime('%Y%m%d')}"
|
|
148
164
|
new_project = self.get_project(new_repo_name)
|
|
149
165
|
if new_project is not None:
|
|
150
|
-
|
|
166
|
+
P.red(f"Project {new_repo_name} already exists. Deleting...")
|
|
151
167
|
self.delete_project(new_project.id)
|
|
152
168
|
project.name = new_repo_name
|
|
153
169
|
project.path = new_repo_name
|
|
154
|
-
|
|
170
|
+
P.yellow(f"Repository {repo_name} renaming to {new_repo_name}.")
|
|
155
171
|
project.save()
|
|
156
|
-
|
|
172
|
+
P.green(f"Repository {repo_name} renamed to {new_repo_name}.")
|
|
157
173
|
return project
|
|
158
174
|
|
|
159
175
|
def reset_repository(self, repo_name, gitattributes=None, user_id=8064473, sleep_for=10, delete_only=False):
|
|
@@ -162,13 +178,13 @@ class GitLabManager:
|
|
|
162
178
|
project = self.get_project(repo_name)
|
|
163
179
|
self.delete_project(project.id)
|
|
164
180
|
if not delete_only:
|
|
165
|
-
|
|
181
|
+
P.red(f"Waiting for {sleep_for} seconds for the project to be completely deleted...")
|
|
166
182
|
time.sleep(sleep_for)
|
|
167
183
|
project = self.create_repository(repo_name, provide_owner_access=True, user_id=user_id)
|
|
168
184
|
if gitattributes is not None:
|
|
169
185
|
commit = self.create_and_commit_file(project_id=project.id, file_path=".gitattributes",
|
|
170
186
|
content=gitattributes)
|
|
171
|
-
print(commit)
|
|
187
|
+
# print(commit)
|
|
172
188
|
return project
|
|
173
189
|
except Exception as e:
|
|
174
190
|
print(f"Failed to reset repository: {e}")
|
|
@@ -226,7 +242,7 @@ class GitLabManager:
|
|
|
226
242
|
if override_target:
|
|
227
243
|
target_project = self.get_project(target_repo_name)
|
|
228
244
|
if target_project is not None:
|
|
229
|
-
|
|
245
|
+
P.red(f"Project {target_repo_name} already exists. Deleting...")
|
|
230
246
|
self.delete_project(target_project.id)
|
|
231
247
|
if self.get_project(target_repo_name) is not None:
|
|
232
248
|
print(f"Project {target_repo_name} already exists. Exiting...")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|