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
14c19cf1
Commit
14c19cf1
authored
Nov 15, 2013
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release script: Add dist files in multiple commits for a clean final commit with a small diff
parent
b04b3861
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
release.js
build/release.js
+15
-3
No files found.
build/release.js
View file @
14c19cf1
...
@@ -301,13 +301,25 @@ function checkoutCommit( next ) {
...
@@ -301,13 +301,25 @@ function checkoutCommit( next ) {
function
commitDistFiles
(
next
)
{
function
commitDistFiles
(
next
)
{
// Remove scripts property from package.json
// Remove scripts property from package.json
// Building and bower are irrelevant as those files will be committed
// Makes for a clean npm install
var
pkgClone
=
readJSON
(
"package.json"
);
var
pkgClone
=
readJSON
(
"package.json"
);
delete
pkgClone
.
scripts
;
delete
pkgClone
.
scripts
;
fs
.
writeFileSync
(
"package.json"
,
JSON
.
stringify
(
pkgClone
,
null
,
"
\
t"
)
);
fs
.
writeFileSync
(
"package.json"
,
JSON
.
stringify
(
pkgClone
,
null
,
"
\
t"
)
);
// Add files to be committed
// Add files to be committed
// Use force to add normally ignored files
git
(
[
"add"
,
"package.json"
],
function
()
{
git
(
[
"add"
,
"-f"
,
"package.json"
,
devFile
,
minFile
,
mapFile
,
sizzleLoc
],
function
()
{
git
(
[
"commit"
,
"-m"
,
"Remove scripts property from package.json"
],
function
()
{
git
(
[
"commit"
,
"-m"
,
releaseVersion
],
next
,
debug
);
// Add sizzle in a separate commit to avoid a big diff
// Use force to add normally ignored files
git
(
[
"add"
,
"-f"
,
sizzleLoc
],
function
()
{
git
(
[
"commit"
,
"-m"
,
"Add sizzle"
],
function
()
{
// Add jquery files for distribution in a final commit
git
(
[
"add"
,
"-f"
,
devFile
,
minFile
,
mapFile
],
function
()
{
git
(
[
"commit"
,
"-m"
,
releaseVersion
],
next
,
debug
);
},
debug
);
},
debug
);
},
debug
);
},
debug
);
},
debug
);
},
debug
);
}
}
...
...
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