Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
ab542c11
Commit
ab542c11
authored
Jun 18, 2012
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grunt: Include commit in header if passed as ENV arg, mostly for Jenkins
parent
80295ed0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
grunt.js
grunt.js
+6
-2
No files found.
grunt.js
View file @
ab542c11
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
*/
*/
/*global config:true, task:true*/
/*global config:true, task:true
, process:true
*/
module
.
exports
=
function
(
grunt
)
{
module
.
exports
=
function
(
grunt
)
{
// readOptionalJSON
// readOptionalJSON
...
@@ -228,6 +228,7 @@ module.exports = function( grunt ) {
...
@@ -228,6 +228,7 @@ module.exports = function( grunt ) {
optIn
=
!
modules
[
"*"
],
optIn
=
!
modules
[
"*"
],
name
=
this
.
file
.
dest
,
name
=
this
.
file
.
dest
,
excluded
=
{},
excluded
=
{},
version
=
config
(
"pkg.version"
),
excluder
=
function
(
flag
,
needsFlag
)
{
excluder
=
function
(
flag
,
needsFlag
)
{
// explicit > implicit, so set this first and let it be overridden by explicit
// explicit > implicit, so set this first and let it be overridden by explicit
if
(
optIn
&&
!
modules
[
flag
]
&&
!
modules
[
"+"
+
flag
]
)
{
if
(
optIn
&&
!
modules
[
flag
]
&&
!
modules
[
"+"
+
flag
]
)
{
...
@@ -243,6 +244,9 @@ module.exports = function( grunt ) {
...
@@ -243,6 +244,9 @@ module.exports = function( grunt ) {
}
}
};
};
if
(
process
.
env
.
COMMIT
)
{
version
+=
" "
+
process
.
env
.
COMMIT
;
}
// figure out which files to exclude based on these rules in this order:
// figure out which files to exclude based on these rules in this order:
// explicit > implicit (explicit also means a dependency/dependent that was explicit)
// explicit > implicit (explicit also means a dependency/dependent that was explicit)
...
@@ -312,7 +316,7 @@ module.exports = function( grunt ) {
...
@@ -312,7 +316,7 @@ module.exports = function( grunt ) {
// Embed Date
// Embed Date
// Embed Version
// Embed Version
compiled
=
compiled
.
replace
(
"@DATE"
,
new
Date
()
)
compiled
=
compiled
.
replace
(
"@DATE"
,
new
Date
()
)
.
replace
(
"@VERSION"
,
config
(
"pkg.version"
)
);
.
replace
(
"@VERSION"
,
version
);
// Write concatenated source to file
// Write concatenated source to file
file
.
write
(
name
,
compiled
);
file
.
write
(
name
,
compiled
);
...
...
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