Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
386a14c2
Commit
386a14c2
authored
Apr 07, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete hg commands
add GIT_COMMIT to build result
parent
d71ef65e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
45 deletions
+5
-45
build/Gruntfile.js
build/Gruntfile.js
+5
-44
build/package.json
build/package.json
+0
-1
No files found.
build/Gruntfile.js
View file @
386a14c2
module
.
exports
=
function
(
grunt
)
{
var
_
=
require
(
'
lodash
'
),
defaultConfig
,
packageFile
,
revisionHash
=
'
@@REVISION
'
,
revisionTimeStamp
=
'
@@REVISIONDATE
'
;
packageFile
;
grunt
.
loadNpmTasks
(
'
grunt-contrib-clean
'
);
...
...
@@ -55,43 +53,6 @@ module.exports = function(grunt) {
});
}
grunt
.
registerTask
(
'
init-config
'
,
'
Initialize build script
'
,
function
()
{
var
exec
=
require
(
'
child_process
'
).
exec
,
done
=
this
.
async
(),
commandsRef
=
0
;
function
doneTask
()
{
if
(
--
commandsRef
<=
0
)
{
done
(
true
);
}
}
function
doCommand
(
command
,
callback
)
{
commandsRef
++
;
exec
(
command
,
callback
);
}
doCommand
(
'
hg log -r -1 --template "{node|short}"
'
,
function
(
error
,
stdout
,
stderr
)
{
if
(
error
)
{
grunt
.
log
.
writeln
(
'
Error:
'
+
error
);
}
else
{
revisionHash
=
stdout
;
}
doneTask
();
});
doCommand
(
'
hg log -r -1 --template "{date|isodate}"
'
,
function
(
error
,
stdout
,
stderr
)
{
if
(
error
)
{
grunt
.
log
.
writeln
(
'
Error:
'
+
error
);
}
else
{
revisionTimeStamp
=
stdout
;
}
doneTask
();
});
});
grunt
.
initConfig
({
mocha
:
{
test
:
{
...
...
@@ -212,7 +173,7 @@ module.exports = function(grunt) {
'
*
\n
'
+
'
* <%= pkg.homepage %>
\n
'
+
'
*
\n
'
+
'
* Version: <%= pkg.version %> (build:<%= pkg.build %>, rev:
'
+
revisionHash
+
'
, date:
'
+
revisionTimeStamp
+
'
)
\n
'
+
'
* Version: <%= pkg.version %> (build:<%= pkg.build %>, rev:
'
+
(
process
.
env
[
'
GIT_COMMIT
'
]
||
'
local
'
)
+
'
)
\n
'
+
'
*/
\n
'
},
dist
:
{
...
...
@@ -444,9 +405,9 @@ module.exports = function(grunt) {
}
});
grunt
.
registerTask
(
'
deploy-documenteditor
'
,
[
'
init-build-documenteditor
'
,
'
init-config
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
deploy-spreadsheeteditor
'
,
[
'
init-build-spreadsheeteditor
'
,
'
init-config
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
deploy-presentationeditor
'
,
[
'
init-build-presentationeditor
'
,
'
init-config
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
deploy-documenteditor
'
,
[
'
init-build-documenteditor
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
deploy-spreadsheeteditor
'
,
[
'
init-build-spreadsheeteditor
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
deploy-presentationeditor
'
,
[
'
init-build-presentationeditor
'
,
'
deploy-app
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
deploy-documenteditor
'
,
'
deploy-spreadsheeteditor
'
,
'
deploy-presentationeditor
'
]);
};
\ No newline at end of file
build/package.json
View file @
386a14c2
...
...
@@ -6,7 +6,6 @@
"dependencies"
:
{
"lodash"
:
"^4.0.0"
,
"grunt"
:
"0.4.5"
,
"grunt-exec"
:
"0.4.5"
,
"grunt-replace"
:
"0.7.3"
,
"grunt-html-minify"
:
"0.3.1"
,
"grunt-text-replace"
:
"0.3.11"
,
...
...
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