Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jlopez
wicopa
Commits
1782b134
Commit
1782b134
authored
May 11, 2020
by
jlopez
Browse files
Fix build cmd
parent
ddd340ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
inc/js/wicopa.js
View file @
1782b134
...
@@ -36,22 +36,34 @@ $( "#generateButton" ).click(function() {
...
@@ -36,22 +36,34 @@ $( "#generateButton" ).click(function() {
*/
*/
function
buildCommand
()
{
function
buildCommand
()
{
var
filename
=
getValue
(
"
imageNameInput
"
);
var
cmd
=
"
sudo
"
;
var
isSingularity
=
getChecked
(
"
singularityRadio
"
);
var
isSingularity
=
getChecked
(
"
singularityRadio
"
);
var
filename
=
getValue
(
"
imageNameInput
"
);
if
(
filename
===
""
)
{
if
(
isSingularity
)
{
if
(
isSingularity
)
{
filename
=
"
Singularity
"
;
cmd
+=
"
singularity build
"
;
}
else
{
filename
=
"
Dockerfile
"
;
if
(
filename
===
""
)
{
cmd
+=
"
myimg.sif Singularity
"
;
}
else
{
cmd
+=
filename
+
"
.sif
"
+
filename
+
"
.def
"
;
}
}
}
}
else
{
if
(
isSingularity
)
{
cmd
+=
"
docker build
"
;
alert
(
"
sudo singularity build ./
"
+
filename
);
}
else
{
if
(
filename
===
""
)
{
alert
(
"
sudo docker build ./
"
+
filename
);
cmd
+=
"
.
"
;
}
else
{
cmd
+=
"
-f
"
+
filename
+
"
.
"
;
}
}
}
alert
(
cmd
);
}
}
...
@@ -68,6 +80,11 @@ function downloadFile() {
...
@@ -68,6 +80,11 @@ function downloadFile() {
filename
=
"
Dockerfile
"
;
filename
=
"
Dockerfile
"
;
}
}
}
}
else
{
if
(
isSingularity
)
{
filename
+=
"
.def
"
;
}
}
var
text
=
getValue
(
"
containerPreview
"
);
var
text
=
getValue
(
"
containerPreview
"
);
var
element
=
document
.
createElement
(
'
a
'
);
var
element
=
document
.
createElement
(
'
a
'
);
...
...
jlopez
@jlopez
mentioned in issue
#23 (closed)
·
May 11, 2020
mentioned in issue
#23 (closed)
mentioned in issue #23
Toggle commit list
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