Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vagrant-boxen
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Piotr Maślanka
vagrant-boxen
Commits
87f50598
There was a problem fetching the latest pipeline status.
Commit
87f50598
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
f8f73ac9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#620
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
make.py
+6
-3
6 additions, 3 deletions
make.py
with
6 additions
and
3 deletions
make.py
+
6
−
3
View file @
87f50598
...
@@ -6,12 +6,14 @@ Run when
...
@@ -6,12 +6,14 @@ Run when
- their README.md is changed
- their README.md is changed
"""
"""
from
__future__
import
print_function
,
absolute_import
,
division
from
__future__
import
print_function
,
absolute_import
,
division
import
os
import
os
import
os.path
import
os.path
import
sys
import
sys
PREFIX
=
'
henrietta/
'
PREFIX
=
'
henrietta/
'
def
readfile
(
path
,
prefix
=
None
,
lines
=
False
,
strip
=
True
):
def
readfile
(
path
,
prefix
=
None
,
lines
=
False
,
strip
=
True
):
if
prefix
is
not
None
:
if
prefix
is
not
None
:
path
=
os
.
path
.
join
(
prefix
,
path
)
path
=
os
.
path
.
join
(
prefix
,
path
)
...
@@ -27,6 +29,7 @@ def readfile(path, prefix=None, lines=False, strip=True):
...
@@ -27,6 +29,7 @@ def readfile(path, prefix=None, lines=False, strip=True):
d
=
d
.
strip
()
d
=
d
.
strip
()
return
d
return
d
def
writefile
(
content
,
path
,
prefix
=
None
):
def
writefile
(
content
,
path
,
prefix
=
None
):
if
prefix
is
not
None
:
if
prefix
is
not
None
:
path
=
os
.
path
.
join
(
prefix
,
path
)
path
=
os
.
path
.
join
(
prefix
,
path
)
...
@@ -37,9 +40,10 @@ def writefile(content, path, prefix=None):
...
@@ -37,9 +40,10 @@ def writefile(content, path, prefix=None):
for
piece
in
content
:
for
piece
in
content
:
f
.
write
(
piece
)
f
.
write
(
piece
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
dirs
=
[
dir
for
dir
in
os
.
listdir
(
'
.
'
)
if
os
.
path
.
isdir
(
dir
)
or
(
dir
!=
'
.git
'
)]
dirs
=
[
dir
for
dir
in
os
.
listdir
(
'
.
'
)
if
os
.
path
.
isdir
(
dir
)
or
(
dir
!=
'
.git
'
)]
exi
=
lambda
box
,
sup
:
os
.
path
.
exists
(
os
.
path
.
join
(
box
,
'
build%s.sh
'
%
(
sup
,
)))
exi
=
lambda
box
,
sup
:
os
.
path
.
exists
(
os
.
path
.
join
(
box
,
'
build%s.sh
'
%
(
sup
,)))
boxes
=
[
box
for
box
in
dirs
if
exi
(
box
,
''
)
or
exi
(
box
,
'
_as_vagrant
'
)]
boxes
=
[
box
for
box
in
dirs
if
exi
(
box
,
''
)
or
exi
(
box
,
'
_as_vagrant
'
)]
if
len
(
sys
.
argv
)
==
1
:
if
len
(
sys
.
argv
)
==
1
:
...
@@ -142,7 +146,7 @@ build_$BOX:
...
@@ -142,7 +146,7 @@ build_$BOX:
}]
}]
}
}
'''
.
replace
(
'
$DESCRIPTION
'
,
description
).
replace
(
'
$BOX
'
,
box
).
replace
(
'
$PREFIX
'
,
PREFIX
).
replace
(
'
$VERSION
'
,
VERSION
),
'''
.
replace
(
'
$DESCRIPTION
'
,
description
).
replace
(
'
$BOX
'
,
box
).
replace
(
'
$PREFIX
'
,
PREFIX
).
replace
(
'
$VERSION
'
,
VERSION
),
'
metadata.json
'
)
'
metadata.json
'
)
if
len
(
sys
.
argv
)
==
3
:
if
len
(
sys
.
argv
)
==
3
:
if
sys
.
argv
[
-
2
]
==
'
newbox
'
:
if
sys
.
argv
[
-
2
]
==
'
newbox
'
:
...
@@ -175,4 +179,3 @@ content of Vagrantfile that will refer to this box.
...
@@ -175,4 +179,3 @@ content of Vagrantfile that will refer to this box.
# You can delete it if you want to.
# You can delete it if you want to.
# cd into a directory if you depend on a particular working directory.
# cd into a directory if you depend on a particular working directory.
'''
,
'
build_as_vagrant.sh
'
,
box
)
'''
,
'
build_as_vagrant.sh
'
,
box
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment