Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel393
Commits
bc2315d8
Commit
bc2315d8
authored
Nov 17, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for preferred protocol look into .git/config
parent
114aa078
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
18 deletions
+43
-18
setup.py
setup.py
+43
-18
No files found.
setup.py
View file @
bc2315d8
...
@@ -117,6 +117,28 @@ def read_local_conf_dev(conf_file,pattern):
...
@@ -117,6 +117,28 @@ def read_local_conf_dev(conf_file,pattern):
ret
=
line
.
split
(
"="
)[
1
]
.
strip
()
.
strip
(
"
\"
"
)
ret
=
line
.
split
(
"="
)[
1
]
.
strip
()
.
strip
(
"
\"
"
)
return
ret
return
ret
# reads protocol from the current repository and converts all other projects to this protocol
# https - user/password access
# git - key-based access
def
read_git_proto
(
conf_file
,
pattern
):
ret
=
"0"
if
os
.
path
.
isfile
(
conf_file
):
with
open
(
conf_file
,
"r"
)
as
f
:
lines
=
f
.
readlines
()
for
line
in
lines
:
if
len
(
line
)
!=
0
:
if
line
.
strip
()[
0
]
!=
"#"
:
pars
=
line
.
strip
()
.
split
(
"="
)
if
(
len
(
pars
)
>
1
):
# simple test
if
pars
[
0
]
.
strip
()
==
'url'
:
test
=
pars
[
1
]
.
find
(
pattern
)
if
test
!=-
1
:
ret
=
"1"
print
(
"ogogo! "
+
pars
[
1
]
.
strip
())
return
ret
def
update_branch
(
names_from_conf
,
name_from_list
,
pars
,
git_proto
):
def
update_branch
(
names_from_conf
,
name_from_list
,
pars
,
git_proto
):
# GIT host is defined in projects.json,
# GIT host is defined in projects.json,
...
@@ -155,7 +177,10 @@ else:
...
@@ -155,7 +177,10 @@ else:
print
(
"ok"
)
print
(
"ok"
)
project_branches
=
read_local_conf
(
"poky/build/conf/local.conf"
,
"ELPHEL393_branches"
)
project_branches
=
read_local_conf
(
"poky/build/conf/local.conf"
,
"ELPHEL393_branches"
)
git_proto
=
read_local_conf_dev
(
"poky/build/conf/local.conf"
,
"ELPHEL393_DEV"
)
#git_proto = read_local_conf_dev("poky/build/conf/local.conf","ELPHEL393_DEV")
git_proto
=
read_git_proto
(
".git/config"
,
"git@"
)
i
=
0
i
=
0
for
p
,
v
in
Projects
.
items
():
for
p
,
v
in
Projects
.
items
():
i
=
i
+
1
i
=
i
+
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment