fosslight-util 2.1.10__py3-none-any.whl → 2.1.11__py3-none-any.whl
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.
- fosslight_util/download.py +7 -11
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/METADATA +1 -1
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/RECORD +7 -7
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/LICENSE +0 -0
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/WHEEL +0 -0
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/entry_points.txt +0 -0
- {fosslight_util-2.1.10.dist-info → fosslight_util-2.1.11.dist-info}/top_level.txt +0 -0
fosslight_util/download.py
CHANGED
|
@@ -123,8 +123,10 @@ def cli_download_and_extract(link: str, target_dir: str, log_dir: str, checkout_
|
|
|
123
123
|
is_rubygems = src_info.get("rubygems", False)
|
|
124
124
|
|
|
125
125
|
# General download (git clone, wget)
|
|
126
|
-
success_git, msg, oss_name, oss_version = download_git_clone(link, target_dir,
|
|
127
|
-
|
|
126
|
+
success_git, msg, oss_name, oss_version = download_git_clone(link, target_dir,
|
|
127
|
+
checkout_to,
|
|
128
|
+
tag, branch,
|
|
129
|
+
ssh_key, id, git_token)
|
|
128
130
|
link = change_ssh_link_to_https(link)
|
|
129
131
|
if (not is_rubygems) and (not success_git):
|
|
130
132
|
if os.path.isfile(target_dir):
|
|
@@ -205,27 +207,21 @@ def get_github_token(git_url):
|
|
|
205
207
|
def download_git_repository(refs_to_checkout, git_url, target_dir, tag):
|
|
206
208
|
success = False
|
|
207
209
|
oss_version = ""
|
|
208
|
-
clone_default_branch_flag = False
|
|
209
210
|
|
|
210
211
|
logger.info(f"Download git url :{git_url}")
|
|
211
212
|
if refs_to_checkout:
|
|
212
213
|
try:
|
|
213
214
|
# gitPython uses the branch argument the same whether you check out to a branch or a tag.
|
|
214
|
-
|
|
215
|
+
Repo.clone_from(git_url, target_dir, branch=refs_to_checkout)
|
|
215
216
|
success = True
|
|
217
|
+
oss_version = refs_to_checkout
|
|
216
218
|
except GitCommandError as error:
|
|
217
219
|
logger.debug(f"Git checkout error:{error}")
|
|
218
220
|
success = False
|
|
219
221
|
|
|
220
222
|
if not success:
|
|
221
|
-
|
|
222
|
-
clone_default_branch_flag = True
|
|
223
|
+
Repo.clone_from(git_url, target_dir)
|
|
223
224
|
success = True
|
|
224
|
-
|
|
225
|
-
if refs_to_checkout != tag or clone_default_branch_flag:
|
|
226
|
-
oss_version = repo.active_branch.name
|
|
227
|
-
else:
|
|
228
|
-
oss_version = repo.git.describe('--tags')
|
|
229
225
|
return success, oss_version
|
|
230
226
|
|
|
231
227
|
|
|
@@ -4,7 +4,7 @@ fosslight_util/compare_yaml.py,sha256=eLqqCLgERxRHN5vsnpQVMXIEU862Lx66mD_y4uMgQE
|
|
|
4
4
|
fosslight_util/constant.py,sha256=Ig3ACm9_QirE4389Wt-IfxOqRkVOUjqGnX1B05z2Byo,2151
|
|
5
5
|
fosslight_util/correct.py,sha256=3iUipan8ZX8sbyIIGAPtMkAGvZ4YucjeJwx1K1Bx_z4,3897
|
|
6
6
|
fosslight_util/cover.py,sha256=qqqKzxqFwKimal764FaugRUBcHWdeKt8af6xeK0mH8E,2040
|
|
7
|
-
fosslight_util/download.py,sha256=
|
|
7
|
+
fosslight_util/download.py,sha256=5nLe0oE1pUHEawM4kLlryusPBlk6ptEvy4HtqwFmCMs,16292
|
|
8
8
|
fosslight_util/exclude.py,sha256=fDmBsZJ_F7O9Oh2T-07R03XNbElo1tFaf_z01KfSAqU,2399
|
|
9
9
|
fosslight_util/help.py,sha256=M3_XahUkP794US9Q0NS6ujmGvrFFnKBHsTU95Fg1KpA,2181
|
|
10
10
|
fosslight_util/oss_item.py,sha256=8W2HlwqGH3l1iPPdvycrRYKsBSBpqAkqYyYtBVPgMtY,6868
|
|
@@ -24,9 +24,9 @@ fosslight_util/write_yaml.py,sha256=QlEKoIPQsEaYERfbP53TeKgnllYzhLQWm5wYjnWtVjE,
|
|
|
24
24
|
fosslight_util/resources/frequentLicenselist.json,sha256=GUhzK6tu7ok10fekOnmVmUgIGRC-acGABZKTNKfDyYA,4776157
|
|
25
25
|
fosslight_util/resources/frequent_license_nick_list.json,sha256=ryU2C_6ZxHbz90_sUN9OvI9GXkCMLu7oGcmd9W79YYo,5005
|
|
26
26
|
fosslight_util/resources/licenses.json,sha256=mK55z-bhY7Mjpj2KsO1crKGGL-X3F6MBFQJ0zLlx010,240843
|
|
27
|
-
fosslight_util-2.1.
|
|
28
|
-
fosslight_util-2.1.
|
|
29
|
-
fosslight_util-2.1.
|
|
30
|
-
fosslight_util-2.1.
|
|
31
|
-
fosslight_util-2.1.
|
|
32
|
-
fosslight_util-2.1.
|
|
27
|
+
fosslight_util-2.1.11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
28
|
+
fosslight_util-2.1.11.dist-info/METADATA,sha256=IPVWkUABqpyTDjH4H8w_bNSfdkEBLQqr_be_yCvOJaU,6500
|
|
29
|
+
fosslight_util-2.1.11.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
30
|
+
fosslight_util-2.1.11.dist-info/entry_points.txt,sha256=bzXX5i7HZ13V8BLKvtu_9KO3ZjtRypH-XszOXT6I3bU,69
|
|
31
|
+
fosslight_util-2.1.11.dist-info/top_level.txt,sha256=2qyYWGLakgBRy4BqoBNt-I5C29tBr_e93e5e1pbuTGA,15
|
|
32
|
+
fosslight_util-2.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|