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
a31f28b0
Commit
a31f28b0
authored
Aug 30, 2012
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update release script and notes builder.
parent
0ca936d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
30 deletions
+20
-30
release-notes.js
build/release-notes.js
+3
-3
release.js
build/release.js
+17
-27
No files found.
build/release-notes.js
View file @
a31f28b0
...
@@ -9,9 +9,9 @@ var fs = require("fs"),
...
@@ -9,9 +9,9 @@ var fs = require("fs"),
extract
=
/<a href="
\/
ticket
\/(\d
+
)
" title="View ticket">
(
.*
?)
<
[^
"
]
+"component">
\s
*
(\S
+
)
/g
;
extract
=
/<a href="
\/
ticket
\/(\d
+
)
" title="View ticket">
(
.*
?)
<
[^
"
]
+"component">
\s
*
(\S
+
)
/g
;
var
opts
=
{
var
opts
=
{
version
:
"1.8"
,
version
:
"1.8
1
"
,
short_version
:
"1.8"
,
short_version
:
"1.8
.1
"
,
final_version
:
"1.8"
,
final_version
:
"1.8
.1
"
,
categories
:
[]
categories
:
[]
};
};
...
...
build/release.js
View file @
a31f28b0
...
@@ -24,7 +24,7 @@ var releaseVersion,
...
@@ -24,7 +24,7 @@ var releaseVersion,
branch
=
"master"
,
branch
=
"master"
,
// Windows needs the .cmd version but will find the non-.cmd
// Windows needs the .cmd version but will find the non-.cmd
// On Windows,
run from the Windows prompt, not a Cygwin shell
// On Windows,
ensure the HOME environment variable is set
gruntCmd
=
process
.
platform
===
"win32"
?
"grunt.cmd"
:
"grunt"
,
gruntCmd
=
process
.
platform
===
"win32"
?
"grunt.cmd"
:
"grunt"
,
devFile
=
"dist/jquery.js"
,
devFile
=
"dist/jquery.js"
,
...
@@ -61,9 +61,6 @@ function initialize( next ) {
...
@@ -61,9 +61,6 @@ function initialize( next ) {
patch
=
version
[
3
],
patch
=
version
[
3
],
xbeta
=
version
[
4
];
xbeta
=
version
[
4
];
if
(
debug
)
{
console
.
warn
(
"=== DEBUG MODE ==="
);
}
releaseVersion
=
process
.
argv
[
2
];
releaseVersion
=
process
.
argv
[
2
];
isBeta
=
!!
xbeta
;
isBeta
=
!!
xbeta
;
...
@@ -72,23 +69,25 @@ function initialize( next ) {
...
@@ -72,23 +69,25 @@ function initialize( next ) {
die
(
"Usage: "
+
process
.
argv
[
1
]
+
" releaseVersion"
);
die
(
"Usage: "
+
process
.
argv
[
1
]
+
" releaseVersion"
);
}
}
if
(
xbeta
===
"pre"
)
{
if
(
xbeta
===
"pre"
)
{
die
(
"Cannot release a 'pre' version"
);
die
(
"Cannot release a 'pre' version
!
"
);
}
}
if
(
!
(
fs
.
existsSync
||
path
.
existsSync
)(
"package.json"
)
)
{
if
(
!
(
fs
.
existsSync
||
path
.
existsSync
)(
"package.json"
)
)
{
die
(
"No package.json in this directory"
);
die
(
"No package.json in this directory"
);
}
}
if
(
debug
)
{
console
.
warn
(
"=== DEBUG MODE ==="
);
}
pkg
=
JSON
.
parse
(
fs
.
readFileSync
(
"package.json"
)
);
pkg
=
JSON
.
parse
(
fs
.
readFileSync
(
"package.json"
)
);
console
.
log
(
"Current version is "
+
pkg
.
version
+
"; generating release "
+
releaseVersion
);
console
.
log
(
"Current version is "
+
pkg
.
version
+
"; generating release "
+
releaseVersion
);
version
=
pkg
.
version
.
match
(
rversion
);
version
=
pkg
.
version
.
match
(
rversion
);
oldver
=
(
+
version
[
1
])
*
10000
+
(
+
version
[
2
]
*
100
)
+
(
+
version
[
3
]
)
oldver
=
(
+
version
[
1
]
)
*
10000
+
(
+
version
[
2
]
*
100
)
+
(
+
version
[
3
]
)
newver
=
(
+
major
)
*
10000
+
(
+
minor
*
100
)
+
(
+
patch
);
newver
=
(
+
major
)
*
10000
+
(
+
minor
*
100
)
+
(
+
patch
);
if
(
newver
<
oldver
)
{
if
(
newver
<
oldver
)
{
die
(
"Next version is older than current version!"
);
die
(
"Next version is older than current version!"
);
}
}
nextVersion
=
major
+
"."
+
minor
+
"."
+
(
isBeta
?
patch
:
+
patch
+
1
)
+
"pre"
;
nextVersion
=
major
+
"."
+
minor
+
"."
+
(
isBeta
?
patch
:
+
patch
+
1
)
+
"pre"
;
next
();
next
();
}
}
function
checkGitStatus
(
next
)
{
function
checkGitStatus
(
next
)
{
...
@@ -134,28 +133,18 @@ function uploadToCDN( next ) {
...
@@ -134,28 +133,18 @@ function uploadToCDN( next ) {
Object
.
keys
(
finalFiles
).
forEach
(
function
(
name
)
{
Object
.
keys
(
finalFiles
).
forEach
(
function
(
name
)
{
cmds
.
push
(
function
(
x
){
cmds
.
push
(
function
(
x
){
exec
(
"scp "
+
name
+
" "
+
scpURL
,
x
);
exec
(
"scp "
+
name
+
" "
+
scpURL
,
x
,
skipRemote
);
});
});
cmds
.
push
(
function
(
x
){
cmds
.
push
(
function
(
x
){
exec
(
"curl '"
+
cdnURL
+
name
+
"?reload'"
,
x
);
exec
(
"curl '"
+
cdnURL
+
name
+
"?reload'"
,
x
,
skipRemote
);
});
});
});
});
cmds
.
push
(
next
);
cmds
.
push
(
next
);
if
(
skipRemote
)
{
console
.
warn
(
"Skipping remote file copies"
);
next
();
}
else
{
steps
.
apply
(
this
,
cmds
);
steps
.
apply
(
this
,
cmds
);
}
}
}
function
pushToGithub
(
next
)
{
function
pushToGithub
(
next
)
{
if
(
skipRemote
)
{
exec
(
"git push --tags "
+
repoURL
+
" "
+
branch
,
next
,
skipRemote
);
console
.
warn
(
"Skipping git push --tags"
);
next
();
}
else
{
exec
(
"git push --tags "
+
repoURL
+
" "
+
branch
,
next
);
}
}
}
//==============================
//==============================
...
@@ -181,11 +170,12 @@ function copy( oldFile, newFile ) {
...
@@ -181,11 +170,12 @@ function copy( oldFile, newFile ) {
fs
.
writeFileSync
(
newFile
,
fs
.
readFileSync
(
oldFile
,
"utf8"
)
);
fs
.
writeFileSync
(
newFile
,
fs
.
readFileSync
(
oldFile
,
"utf8"
)
);
}
}
}
}
function
exec
(
cmd
,
fn
)
{
function
exec
(
cmd
,
fn
,
skip
)
{
console
.
log
(
cmd
);
if
(
debug
||
skip
)
{
if
(
debug
)
{
console
.
log
(
"# "
+
cmd
);
fn
();
fn
();
}
else
{
}
else
{
console
.
log
(
cmd
);
child
.
exec
(
cmd
,
{
env
:
process
.
env
},
function
(
err
,
stdout
,
stderr
)
{
child
.
exec
(
cmd
,
{
env
:
process
.
env
},
function
(
err
,
stdout
,
stderr
)
{
if
(
err
)
{
if
(
err
)
{
die
(
stderr
||
stdout
||
err
);
die
(
stderr
||
stdout
||
err
);
...
@@ -195,7 +185,7 @@ function exec( cmd, fn ) {
...
@@ -195,7 +185,7 @@ function exec( cmd, fn ) {
}
}
}
}
function
die
(
msg
)
{
function
die
(
msg
)
{
console
.
error
(
"E
rror
: "
+
msg
);
console
.
error
(
"E
RROR
: "
+
msg
);
process
.
exit
(
1
);
process
.
exit
(
1
);
}
}
function
exit
()
{
function
exit
()
{
...
...
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