Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
4058cc34
Commit
4058cc34
authored
Feb 26, 2018
by
Guilhem Saurel
Browse files
Robotpkg.update_images
parent
4f5a2954
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
4058cc34
...
...
@@ -538,7 +538,12 @@ class Robotpkg(NamedModel):
path
=
'-wip/wip'
if
self
.
category
==
'wip'
else
f
'/
{
self
.
category
}
'
return
f
'
{
RPKG_URL
}
/rbulk/robotpkg
{
path
}
/
{
self
.
name
}
'
def
update
(
self
,
pull
=
True
):
def
update_images
(
self
,
pull
=
False
):
for
target
in
TARGETS
:
image
,
_
=
Image
.
objects
.
get_or_create
(
robotpkg
=
self
,
target
=
target
)
image
.
update
(
pull
)
def
update
(
self
,
pull
=
True
,
pull_image
=
False
):
path
=
settings
.
RAINBOARD_RPKG
repo
=
git
.
Repo
(
str
(
path
/
'wip'
/
'.git'
if
self
.
category
==
'wip'
else
path
/
'.git'
))
if
pull
:
...
...
@@ -562,11 +567,7 @@ class Robotpkg(NamedModel):
with
(
cwd
/
'DESCR'
).
open
()
as
f
:
self
.
description
=
f
.
read
().
strip
()
for
target
in
TARGETS
:
image
,
created
=
Image
.
objects
.
get_or_create
(
robotpkg
=
self
,
target
=
target
)
if
created
:
image
.
update
()
self
.
update_images
(
pull_image
)
self
.
save
()
def
valid_images
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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