Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7403627
git-build.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
597 B
Referenced Files
None
Subscribers
None
git-build.js
View Options
/*!
* Change the in-memory package version to contain the git HEAD
*/
'use strict'
;
module
.
exports
=
function
(
grunt
)
{
grunt
.
registerTask
(
'git-build'
,
function
()
{
const
done
=
this
.
async
();
require
(
'child_process'
).
exec
(
'git rev-parse HEAD'
,
(
err
,
stout
,
stderr
)
=>
{
if
(
!
stout
||
err
||
stderr
)
{
grunt
.
log
.
error
(
err
||
stderr
);
done
(
false
);
return
;
}
grunt
.
config
.
set
(
'pkg.version'
,
grunt
.
config
(
'pkg.version'
)
+
'-pre ('
+
stout
.
slice
(
0
,
10
)
+
')'
);
grunt
.
verbose
.
writeln
(
'Added git HEAD to pkg.version'
);
done
();
}
);
}
);
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 18:44 (21 h, 47 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dc/b2/f9e3294bd9d69e1af89ae1c3517b
Default Alt Text
git-build.js (597 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment