Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb507c86

Browse files
authored
Release: use buildDefaultFiles directly and pass version
- also add the ability to pass VERSION in env to test final builds- adjust sha regex to account for lack of shas- set the version on the dist package.jsonClosegh-5408
1 parent6376765 commitb507c86

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

‎build/release.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = function( Release ) {
2424
];
2525
constcdn=require("./release/cdn");
2626
constdist=require("./release/dist");
27+
const{ buildDefaultFiles}=require("./tasks/build");
2728

2829
constnpmTags=Release.npmTags;
2930

@@ -53,8 +54,8 @@ module.exports = function( Release ) {
5354
* committed before creating the tag.
5455
*@param {Function} callback
5556
*/
56-
generateArtifacts:function(callback){
57-
Release.exec("npm run build:all");
57+
generateArtifacts:asyncfunction(callback){
58+
awaitbuildDefaultFiles({version:Release.newVersion});
5859

5960
cdn.makeReleaseCopies(Release);
6061
Release._setSrcVersion();
@@ -77,7 +78,7 @@ module.exports = function( Release ) {
7778
* Publish to distribution repo and npm
7879
*@param {Function} callback
7980
*/
80-
dist:asynccallback=>{
81+
dist:asyncfunction(callback){
8182
awaitcdn.makeArchives(Release);
8283
dist(Release,distFiles,callback);
8384
}

‎build/release/dist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ module.exports = function( Release, files, complete ) {
119119
deletepackageJson.devDependencies;
120120
deletepackageJson.dependencies;
121121
deletepackageJson.commitplease;
122+
packageJson.version=Release.newVersion;
122123
awaitfs.writeFile(
123124
`${Release.dir.dist}/package.json`,
124125
JSON.stringify(packageJson,null,2)

‎build/tasks/build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,10 @@ async function build( {
352352
}
353353
}
354354

355-
asyncfunctionbuildDefaultFiles({ version, watch}={}){
355+
asyncfunctionbuildDefaultFiles({
356+
version=process.env.VERSION,
357+
watch
358+
}={}){
356359
awaitPromise.all([
357360
build({ version, watch}),
358361
build({filename:"jquery.slim.js",slim:true, version, watch}),

‎build/tasks/compare_size.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export async function compareSize( { cache = ".sizecache.json", files } = {} ) {
109109
// Remove the short SHA and .dirty from comparisons.
110110
// The short SHA so commits can be compared against each other
111111
// and .dirty to compare with the existing branch during development.
112-
constsha=/jQueryv\d+.\d+.\d+(?:-\w+)?\+(?:slim.)?([^\.]+(?:\.dirty)?)/.exec(contents)[1];
112+
constsha=/jQueryv\d+.\d+.\d+(?:-\w+)?(?:\+|\+slim\.)?([^\.]+(?:\.dirty)?)?/.exec(contents)[1];
113113
contents=contents.replace(newRegExp(sha,"g"),"");
114114

115115
constsize=Buffer.byteLength(contents,"utf8");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp