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
8e76cb73
Commit
8e76cb73
authored
Oct 24, 2012
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build script.
parent
2af15386
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
27 deletions
+37
-27
release-notes.js
build/release-notes.js
+3
-3
release.js
build/release.js
+34
-24
No files found.
build/release-notes.js
View file @
8e76cb73
...
...
@@ -9,9 +9,9 @@ var fs = require("fs"),
extract
=
/<a href="
\/
ticket
\/(\d
+
)
" title="View ticket">
(
.*
?)
<
[^
"
]
+"component">
\s
*
(\S
+
)
/g
;
var
opts
=
{
version
:
"1.8.
2
"
,
short_version
:
"1.8.
2
"
,
final_version
:
"1.8.
2
"
,
version
:
"1.8.
3
"
,
short_version
:
"1.8.
3
"
,
final_version
:
"1.8.
3
"
,
categories
:
[]
};
...
...
build/release.js
View file @
8e76cb73
...
...
@@ -10,18 +10,19 @@ var debug = false,
var
fs
=
require
(
"fs"
),
child
=
require
(
"child_process"
),
path
=
require
(
"path"
),
which
=
require
(
'which'
).
sync
;
which
=
require
(
"which"
).
sync
;
var
releaseVersion
,
nextVersion
,
finalFiles
,
isBeta
,
pkg
,
branch
,
scpURL
=
"jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/"
,
cdnURL
=
"http://code.origin.jquery.com/"
,
repoURL
=
"git
://github.com/jquery
/jquery.git"
,
branch
=
"master
"
,
repoURL
=
"git
@github.com:dmethvin
/jquery.git"
,
//repoURL = "git@github.com:jquery/jquery.git
",
// Windows needs the .cmd version but will find the non-.cmd
// On Windows, ensure the HOME environment variable is set
...
...
@@ -62,18 +63,18 @@ function initialize( next ) {
// First arg should be the version number being released
var
newver
,
oldver
,
rversion
=
/^
(\d)\.(\d
+
)\.(\d)((?:
a|b|rc
)\d
|pre
)?
$/
,
version
=
(
process
.
argv
[
2
]
||
""
).
toLowerCase
().
match
(
rversion
)
||
{},
version
=
(
process
.
argv
[
3
]
||
""
).
toLowerCase
().
match
(
rversion
)
||
{},
major
=
version
[
1
],
minor
=
version
[
2
],
patch
=
version
[
3
],
xbeta
=
version
[
4
];
releaseVersion
=
process
.
argv
[
2
];
branch
=
process
.
argv
[
2
];
releaseVersion
=
process
.
argv
[
3
];
isBeta
=
!!
xbeta
;
if
(
!
major
||
!
minor
||
!
patch
)
{
die
(
"Usage: "
+
process
.
argv
[
1
]
+
" releaseVersion"
);
if
(
!
branch
||
!
major
||
!
minor
||
!
patch
)
{
die
(
"Usage: "
+
process
.
argv
[
1
]
+
"
branch
releaseVersion"
);
}
if
(
xbeta
===
"pre"
)
{
die
(
"Cannot release a 'pre' version!"
);
...
...
@@ -95,7 +96,11 @@ function initialize( next ) {
next
();
}
function
checkGitStatus
(
next
)
{
exec
(
"git status"
,
function
(
error
,
stdout
,
stderr
)
{
child
.
execFile
(
"git"
,
[
"status"
],
{},
function
(
error
,
stdout
,
stderr
)
{
var
onBranch
=
(
stdout
.
match
(
/On branch
(\S
+
)
/
)
||
[])[
1
];
if
(
onBranch
!==
branch
)
{
die
(
"Branches don't match: Wanted "
+
branch
+
", got "
+
onBranch
);
}
if
(
/Changes to be committed/i
.
test
(
stdout
)
)
{
die
(
"Please commit changed files before attemping to push a release."
);
}
...
...
@@ -107,12 +112,12 @@ function checkGitStatus( next ) {
}
function
tagReleaseVersion
(
next
)
{
updatePackageVersion
(
releaseVersion
);
exec
(
'git commit -a -m "Tagging the '
+
releaseVersion
+
' release."'
,
function
(){
exec
(
"git tag "
+
releaseVersion
,
next
);
git
(
[
"commit"
,
"-a"
,
"-m"
,
"Tagging the "
+
releaseVersion
+
" release."
]
,
function
(){
git
(
[
"tag"
,
releaseVersion
]
,
next
);
});
}
function
gruntBuild
(
next
)
{
exec
(
gruntCmd
,
next
);
exec
(
gruntCmd
,
[],
next
);
}
function
makeReleaseCopies
(
next
)
{
finalFiles
=
{};
...
...
@@ -130,17 +135,17 @@ function makeReleaseCopies( next ) {
}
function
setNextVersion
(
next
)
{
updatePackageVersion
(
nextVersion
);
exec
(
'git commit -a -m "Updating the source version to '
+
nextVersion
+
'"'
,
next
);
git
(
[
"commit"
,
"-a"
,
"-m"
,
"Updating the source version to "
+
nextVersion
]
,
next
);
}
function
uploadToCDN
(
next
)
{
var
cmds
=
[];
Object
.
keys
(
finalFiles
).
forEach
(
function
(
name
)
{
cmds
.
push
(
function
(
x
){
exec
(
"scp
"
+
name
+
" "
+
scpURL
,
x
,
skipRemote
);
exec
(
"scp
"
,
[
name
,
scpURL
]
,
x
,
skipRemote
);
});
cmds
.
push
(
function
(
x
){
exec
(
"curl
'"
+
cdnURL
+
name
+
"?reload'"
,
x
,
skipRemote
);
exec
(
"curl
"
,
[
cdnURL
+
name
+
"?reload"
]
,
x
,
skipRemote
);
});
});
cmds
.
push
(
next
);
...
...
@@ -148,7 +153,7 @@ function uploadToCDN( next ) {
steps
.
apply
(
this
,
cmds
);
}
function
pushToGithub
(
next
)
{
exec
(
"git push --tags "
+
repoURL
+
" "
+
branch
,
next
,
skipRemote
);
git
(
[
"push"
,
"--tags"
,
repoURL
,
branch
]
,
next
,
skipRemote
);
}
//==============================
...
...
@@ -174,18 +179,23 @@ function copy( oldFile, newFile ) {
fs
.
writeFileSync
(
newFile
,
fs
.
readFileSync
(
oldFile
,
"utf8"
)
);
}
}
function
exec
(
cmd
,
fn
,
skip
)
{
function
git
(
args
,
fn
,
skip
)
{
exec
(
"git"
,
args
,
fn
,
skip
);
}
function
exec
(
cmd
,
args
,
fn
,
skip
)
{
if
(
debug
||
skip
)
{
console
.
log
(
"# "
+
cmd
);
console
.
log
(
"# "
+
cmd
+
" "
+
args
.
join
(
" "
)
);
fn
();
}
else
{
console
.
log
(
cmd
);
child
.
exec
(
cmd
,
{
env
:
process
.
env
},
function
(
err
,
stdout
,
stderr
)
{
if
(
err
)
{
die
(
stderr
||
stdout
||
err
);
console
.
log
(
cmd
+
" "
+
args
.
join
(
" "
)
);
child
.
execFile
(
cmd
,
args
,
{
env
:
process
.
env
},
function
(
err
,
stdout
,
stderr
)
{
if
(
err
)
{
die
(
stderr
||
stdout
||
err
);
}
fn
();
}
fn
();
});
);
}
}
function
die
(
msg
)
{
...
...
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