Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
explorviz-downloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
ExplorViz
explorviz-github-archive
explorviz-downloader
Commits
f6409722
"...gitlab@git.se.informatik.uni-kiel.de:kieker/webgui.git" did not exist on "a32728dacf790ed2cd8f514bac1a5f825b1360ef"
Commit
f6409722
authored
7 years ago
by
Josefine Wegert
Browse files
Options
Downloads
Patches
Plain Diff
promise chain forfrontend zip works
parent
ce6f3a95
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.js
+19
-5
19 additions, 5 deletions
app.js
with
19 additions
and
5 deletions
app.js
+
19
−
5
View file @
f6409722
...
...
@@ -112,7 +112,9 @@ if (frontendChecked){
const
fileName
=
frontendChecked
;
const
downloadURL
=
downloadFiles
[
frontendChecked
];
const
frontendPullPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
function
frontendPull
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
'
resolve frontendPullPromise
'
,
resolve
);
exec
(
'
cd
'
+
fileName
+
'
git pull
'
,
(
error
,
stdout
,
stderr
)
=>
{
...
...
@@ -126,7 +128,8 @@ const frontendPullPromise = new Promise((resolve, reject) => {
resolve
();
});
})
promiseArray
.
push
(
frontendPullPromise
);
}
promiseArray
.
push
(
frontendPull
);
console
.
log
(
'
promiseArray.push(frontendPullPromise):
'
,
promiseArray
);
...
...
@@ -158,8 +161,9 @@ console.log('promiseArray.push(frontendPullPromise):',promiseArray);
// })
//promiseArray.push(frontendInstallAddons);
//console.log('promiseArray.push(frontendInstallAddons):',promiseArray);
function
frontendBuild
(){
const
frontendBuildPromise
=
frontendPull
Promise
.
then
((
resolve
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
'
resolve frontendBuildPromise
'
,
resolve
);
//build everything you have
exec
(
'
cd
'
+
fileName
+
'
&& ember build --environment=production
'
,
(
error
,
stdout
,
stderr
)
=>
{
...
...
@@ -178,10 +182,19 @@ exec('cd ' + fileName +' && ember build --environment=production', (error, stdou
})
console
.
log
(
'
frontendBuildPromise:
'
,
frontendBuildPromise
);
promiseArray
.
push
(
frontendBuildPromise
);
}
//console.log('frontendBuildPromise:', frontendBuildPromise);
//promiseArray.push(frontendBuild());
console
.
log
(
'
promiseArray:
'
,
promiseArray
);
function
frontendAll
()
{
return
frontendPull
().
then
(
function
(){
return
frontendBuild
()
})
}
promiseArray
.
push
(
frontendAll
());
};
...
...
@@ -204,6 +217,7 @@ console.log('in promise.all: promiseArray', promiseArray);
}).
on
(
'
data
'
,
function
(
data
){
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
frontendStream
=
fs
.
createReadStream
(
data
[
i
]);
console
.
log
(
'
frontend data[i]
'
,
data
[
i
]);
zip
.
file
(
data
[
i
],
frontendStream
);
}
...
...
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