Skip to content

Commit 2e455ed

Browse files
committed
Merge branch 'master' into release
2 parents 73fc22d + 7f661a1 commit 2e455ed

File tree

19 files changed

+156
-79
lines changed

19 files changed

+156
-79
lines changed

.github/workflows/deployDocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- release
78

89
jobs:
910
build-and-deploy:

demo/scripts/releaseDemo.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ const VERSION_INC = 'patch';
1717

1818
function run() {
1919
if (!validateEnv()) {
20+
console.log('Do not release demo');
2021
return;
2122
}
23+
24+
console.log('Release demo');
2225
createNpmRc();
2326
versionTagAndPublish();
2427
}
@@ -27,7 +30,11 @@ function validateEnv() {
2730
if (!process.env.CI) {
2831
throw new Error('releasing is only available from CI');
2932
}
30-
return true;
33+
return (
34+
process.env.BUILDKITE_BRANCH === 'master' ||
35+
process.env.BUILDKITE_BRANCH === 'release' ||
36+
process.env.BUILDKITE_MESSAGE === 'snapshot'
37+
);
3138
}
3239

3340
function createNpmRc() {

demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ exports[`TextField Screen renders screen 1`] = `
728728
},
729729
undefined,
730730
{
731-
"color": "#FC3D2F",
731+
"color": "#D52712",
732732
},
733733
undefined,
734734
undefined,
@@ -1269,7 +1269,7 @@ exports[`TextField Screen renders screen 1`] = `
12691269
},
12701270
undefined,
12711271
{
1272-
"color": "#FC3D2F",
1272+
"color": "#D52712",
12731273
},
12741274
undefined,
12751275
undefined,
@@ -1635,7 +1635,7 @@ exports[`TextField Screen renders screen 1`] = `
16351635
},
16361636
undefined,
16371637
{
1638-
"color": "#FC3D2F",
1638+
"color": "#D52712",
16391639
},
16401640
undefined,
16411641
undefined,
@@ -1866,7 +1866,7 @@ exports[`TextField Screen renders screen 1`] = `
18661866
},
18671867
undefined,
18681868
{
1869-
"color": "#FC3D2F",
1869+
"color": "#D52712",
18701870
},
18711871
undefined,
18721872
undefined,
@@ -2231,7 +2231,7 @@ exports[`TextField Screen renders screen 1`] = `
22312231
},
22322232
undefined,
22332233
{
2234-
"color": "#FC3D2F",
2234+
"color": "#D52712",
22352235
},
22362236
undefined,
22372237
undefined,
@@ -3126,7 +3126,7 @@ exports[`TextField Screen renders screen 1`] = `
31263126
},
31273127
undefined,
31283128
{
3129-
"color": "#FC3D2F",
3129+
"color": "#D52712",
31303130
},
31313131
undefined,
31323132
undefined,
@@ -4023,7 +4023,7 @@ exports[`TextField Screen renders screen 1`] = `
40234023
},
40244024
undefined,
40254025
{
4026-
"color": "#FC3D2F",
4026+
"color": "#D52712",
40274027
},
40284028
undefined,
40294029
undefined,
@@ -4726,7 +4726,7 @@ exports[`TextField Screen renders screen 1`] = `
47264726
},
47274727
undefined,
47284728
{
4729-
"color": "#FC3D2F",
4729+
"color": "#D52712",
47304730
},
47314731
undefined,
47324732
undefined,
@@ -4986,7 +4986,7 @@ exports[`TextField Screen renders screen 1`] = `
49864986
},
49874987
undefined,
49884988
{
4989-
"color": "#FC3D2F",
4989+
"color": "#D52712",
49904990
},
49914991
undefined,
49924992
undefined,
@@ -5276,7 +5276,7 @@ exports[`TextField Screen renders screen 1`] = `
52765276
},
52775277
undefined,
52785278
{
5279-
"color": "#FC3D2F",
5279+
"color": "#D52712",
52805280
},
52815281
undefined,
52825282
undefined,
@@ -6017,7 +6017,7 @@ exports[`TextField Screen renders screen 1`] = `
60176017
},
60186018
undefined,
60196019
{
6020-
"color": "#FC3D2F",
6020+
"color": "#D52712",
60216021
},
60226022
undefined,
60236023
undefined,
@@ -6318,7 +6318,7 @@ exports[`TextField Screen renders screen 1`] = `
63186318
},
63196319
undefined,
63206320
{
6321-
"color": "#FC3D2F",
6321+
"color": "#D52712",
63226322
},
63236323
undefined,
63246324
undefined,
@@ -6647,7 +6647,7 @@ exports[`TextField Screen renders screen 1`] = `
66476647
},
66486648
undefined,
66496649
{
6650-
"color": "#FC3D2F",
6650+
"color": "#D52712",
66516651
},
66526652
undefined,
66536653
undefined,
@@ -7023,7 +7023,7 @@ exports[`TextField Screen renders screen 1`] = `
70237023
},
70247024
undefined,
70257025
{
7026-
"color": "#FC3D2F",
7026+
"color": "#D52712",
70277027
},
70287028
undefined,
70297029
undefined,
@@ -7299,7 +7299,7 @@ exports[`TextField Screen renders screen 1`] = `
72997299
},
73007300
undefined,
73017301
{
7302-
"color": "#FC3D2F",
7302+
"color": "#D52712",
73037303
},
73047304
undefined,
73057305
undefined,
@@ -7554,7 +7554,7 @@ exports[`TextField Screen renders screen 1`] = `
75547554
},
75557555
undefined,
75567556
{
7557-
"color": "#FC3D2F",
7557+
"color": "#D52712",
75587558
},
75597559
undefined,
75607560
undefined,
@@ -7844,7 +7844,7 @@ exports[`TextField Screen renders screen 1`] = `
78447844
},
78457845
undefined,
78467846
{
7847-
"color": "#FC3D2F",
7847+
"color": "#D52712",
78487848
},
78497849
undefined,
78507850
undefined,

docuilib/scripts/releaseDocs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ const p = require('path');
33

44
function run() {
55
if (!validateEnv()) {
6+
console.log('Do not release docs');
67
return;
78
}
89

10+
console.log('Release docs');
911
const currentPublished = findCurrentPublishedVersion();
1012
const packageJson = require('../package.json');
1113
const newVersion = packageJson.version;
@@ -20,7 +22,7 @@ function validateEnv() {
2022
if (!process.env.CI) {
2123
throw new Error('releasing is only available from CI');
2224
}
23-
return true;
25+
return process.env.BUILDKITE_BRANCH === 'master';
2426
}
2527

2628
function createNpmRc() {

docuilib/yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,12 +4040,12 @@ __metadata:
40404040
linkType: hard
40414041

40424042
"brace-expansion@npm:^1.1.7":
4043-
version: 1.1.11
4044-
resolution: "brace-expansion@npm:1.1.11"
4043+
version: 1.1.12
4044+
resolution: "brace-expansion@npm:1.1.12"
40454045
dependencies:
40464046
balanced-match: ^1.0.0
40474047
concat-map: 0.0.1
4048-
checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07
4048+
checksum: 12cb6d6310629e3048cadb003e1aca4d8c9bb5c67c3c321bafdd7e7a50155de081f78ea3e0ed92ecc75a9015e784f301efc8132383132f4f7904ad1ac529c562
40494049
languageName: node
40504050
linkType: hard
40514051

@@ -4821,13 +4821,13 @@ __metadata:
48214821
linkType: hard
48224822

48234823
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3":
4824-
version: 7.0.3
4825-
resolution: "cross-spawn@npm:7.0.3"
4824+
version: 7.0.6
4825+
resolution: "cross-spawn@npm:7.0.6"
48264826
dependencies:
48274827
path-key: ^3.1.0
48284828
shebang-command: ^2.0.0
48294829
which: ^2.0.1
4830-
checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52
4830+
checksum: 8d306efacaf6f3f60e0224c287664093fa9185680b2d195852ba9a863f85d02dcc737094c6e512175f8ee0161f9b87c73c6826034c2422e39de7d6569cf4503b
48314831
languageName: node
48324832
linkType: hard
48334833

@@ -5918,11 +5918,11 @@ __metadata:
59185918
linkType: hard
59195919

59205920
"estree-util-value-to-estree@npm:^3.0.1":
5921-
version: 3.1.2
5922-
resolution: "estree-util-value-to-estree@npm:3.1.2"
5921+
version: 3.3.3
5922+
resolution: "estree-util-value-to-estree@npm:3.3.3"
59235923
dependencies:
59245924
"@types/estree": ^1.0.0
5925-
checksum: 31c4b9f3a2e64119b994a86d70070325b6ec238a21842669e79b0d6a7190150293616c8f38fee1c369c18bbef405064d883aa38c05311db5d0a211a30e9924d6
5925+
checksum: 73851f26715300046228cf8a36986c101d6741d7a2b024f684675e75d1191bc07b0dc069926876729efd5650343d23bffe76104221b7dc862965632302b05524
59265926
languageName: node
59275927
linkType: hard
59285928

eslint-rules/scripts/releaseEslint.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ const p = require('path');
33

44
function run() {
55
if (!validateEnv()) {
6+
console.log('Do not release eslint');
67
return;
78
}
89

10+
console.log('Release eslint');
911
const currentPublished = findCurrentPublishedVersion();
1012
const packageJson = require('../package.json');
1113
const newVersion = packageJson.version;
@@ -20,7 +22,7 @@ function validateEnv() {
2022
if (!process.env.CI) {
2123
throw new Error('releasing is only available from CI');
2224
}
23-
return true;
25+
return process.env.BUILDKITE_BRANCH === 'master';
2426
}
2527

2628
function createNpmRc() {

lib/scripts/releaseNative.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
const exec = require('shell-utils').exec;
22
const p = require('path');
33

4+
// Export buildkite variables for Release build
5+
// We cast toString() because function returns 'object'
6+
const IS_SNAPSHOT = process.env.BUILDKITE_MESSAGE?.match(/^snapshot$/i);
7+
const VERSION_TAG = IS_SNAPSHOT ? 'snapshot' : 'latest';
8+
49
function run() {
510
if (!validateEnv()) {
11+
console.log('Do not release native');
612
return;
713
}
814

15+
console.log('Release native');
16+
const packageJsonVersion = require('../package.json').version;
917
const currentPublished = findCurrentPublishedVersion();
10-
const packageJson = require('../package.json');
11-
const newVersion = packageJson.version;
18+
const newVersion = IS_SNAPSHOT
19+
? `${packageJsonVersion}-snapshot.${process.env.BUILDKITE_BUILD_NUMBER}`
20+
: packageJsonVersion;
1221

13-
if (currentPublished !== newVersion) {
22+
if (currentPublished !== packageJsonVersion) {
1423
createNpmRc();
1524
versionTagAndPublish(currentPublished, newVersion);
1625
}
@@ -20,7 +29,7 @@ function validateEnv() {
2029
if (!process.env.CI) {
2130
throw new Error('releasing is only available from CI');
2231
}
23-
return true;
32+
return process.env.BUILDKITE_BRANCH === 'master' || process.env.BUILDKITE_MESSAGE === 'snapshot';
2433
}
2534

2635
function createNpmRc() {
@@ -49,8 +58,13 @@ function tryPublishAndTag(version) {
4958
}
5059

5160
function tagAndPublish(newVersion) {
52-
console.log(`Trying to publish ${newVersion}...`);
53-
exec.execSync(`npm publish`);
61+
console.log(`trying to publish ${newVersion}...`);
62+
exec.execSync(`npm --no-git-tag-version version ${newVersion}`);
63+
exec.execSync(`npm publish --tag ${VERSION_TAG}`);
64+
if (!IS_SNAPSHOT) {
65+
exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
66+
}
67+
exec.execSyncSilent(`git push deploy ${newVersion} || true`);
5468
}
5569

5670
run();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@babel/plugin-transform-modules-commonjs": "^7.17.9",
6767
"@babel/preset-env": "^7.20.0",
6868
"@babel/preset-react": "^7.10.1",
69-
"@babel/runtime": "^7.20.0",
69+
"@babel/runtime": "^7.26.10",
7070
"@formatjs/intl-datetimeformat": "^6.0.3",
7171
"@formatjs/intl-getcanonicallocales": "^2.0.2",
7272
"@formatjs/intl-locale": "^3.0.3",

scripts/release/release.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ const VERSION_TAG = isRelease ? 'latest' : 'snapshot';
1818
const VERSION_INC = 'patch';
1919
function run() {
2020
if (!validateEnv()) {
21+
console.log('Do not release');
2122
return;
2223
}
24+
25+
console.log('Release');
2326
setupGit();
2427
createNpmRc();
2528
versionTagAndPublish();
@@ -29,7 +32,11 @@ function validateEnv() {
2932
if (!process.env.CI) {
3033
throw new Error('releasing is only available from CI');
3134
}
32-
return true;
35+
return (
36+
process.env.BUILDKITE_BRANCH === 'master' ||
37+
process.env.BUILDKITE_BRANCH === 'release' ||
38+
process.env.BUILDKITE_MESSAGE === 'snapshot'
39+
);
3340
}
3441

3542
function setupGit() {
@@ -79,7 +86,6 @@ function tryPublishAndTag(version) {
7986
}
8087
}
8188

82-
8389
function tagAndPublish(newVersion) {
8490
console.log(`trying to publish ${newVersion}...`);
8591
exec.execSync(`npm --no-git-tag-version version ${newVersion}`);

0 commit comments

Comments
 (0)