Skip to content

Commit bb6e9b5

Browse files
committed
Merge branch 'master' into release
2 parents 520c2e8 + 191cb26 commit bb6e9b5

File tree

163 files changed

+3740
-691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3740
-691
lines changed

.buildkite/pipeline.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
steps:
2+
- block: ":rocket: Release!"
3+
prompt: "Fill out the details for release"
4+
if: 'build.message =~ /^release\$/i'
5+
fields:
6+
- text: "VERSION"
7+
key: "version"
8+
9+
- label: ":hammer_and_pick: Build"
10+
command:
11+
- "nvm install"
12+
- "npm install"
13+
- "npm run test"
14+
- "npm run build"
15+
- "[[ $BUILDKITE_PULL_REQUEST == 'false' ]] && npm run bkRelease && npm run demo || true"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ class MyScreen extends Component {
118118
}
119119
}
120120
```
121+

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"release": "node ./scripts/release.js",
16-
"jenkinsRelease": "node ./scripts/jenkinsRelease.js"
16+
"demoRelease": "node ./scripts/demoRelease.js"
1717
},
1818
"devDependencies": {
1919
"react-native-ui-lib": "*",

demo/scripts/jenkinsRelease.js renamed to demo/scripts/demoRelease.js

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,34 @@ const exec = require('shell-utils').exec;
22
const semver = require('semver');
33
const _ = require('lodash');
44
const p = require('path');
5+
const cp = require('child_process');
56

67
// Workaround JS
7-
const isRelease = process.env.RELEASE_BUILD === 'true';
8-
const branch = process.env.BRANCH;
98

10-
const ONLY_ON_BRANCH = `origin/${branch || 'master'}`;
9+
const isRelease = process.env.BUILDKITE_MESSAGE.match(/^release$/i);
10+
let VERSION;
11+
if (isRelease) {
12+
VERSION = cp.execSync(`buildkite-agent meta-data get version`).toString();
13+
}
14+
1115
const VERSION_TAG = isRelease ? 'latest' : 'snapshot';
1216
const VERSION_INC = 'patch';
1317

1418
function run() {
1519
if (!validateEnv()) {
1620
return;
1721
}
18-
setupGit();
1922
createNpmRc();
2023
versionTagAndPublish();
2124
}
2225

2326
function validateEnv() {
24-
if (!process.env.JENKINS_CI) {
27+
if (!process.env.CI) {
2528
throw new Error('releasing is only available from CI');
2629
}
27-
28-
if (!process.env.JENKINS_MASTER) {
29-
console.log('not publishing on a different build');
30-
return false;
31-
}
32-
33-
if (process.env.GIT_BRANCH !== ONLY_ON_BRANCH) {
34-
console.log(`not publishing on branch ${process.env.GIT_BRANCH}`);
35-
return false;
36-
}
37-
3830
return true;
3931
}
4032

41-
function setupGit() {
42-
exec.execSyncSilent('git config --global push.default simple');
43-
exec.execSyncSilent(`git config --global user.email "${process.env.GIT_EMAIL}"`);
44-
exec.execSyncSilent(`git config --global user.name "${process.env.GIT_USER}"`);
45-
const remoteUrl = new RegExp('https?://(\\S+)').exec(exec.execSyncRead('git remote -v'))[1];
46-
exec.execSyncSilent(`git remote add deploy "https://${process.env.GIT_USER}:${process.env.GIT_TOKEN}@${remoteUrl}"`);
47-
// exec.execSync(`git checkout ${ONLY_ON_BRANCH}`);
48-
}
49-
5033
function createNpmRc() {
5134
exec.execSync('rm -f package-lock.json');
5235
const npmrcPath = p.resolve(`${__dirname}/.npmrc`);
@@ -57,7 +40,7 @@ function versionTagAndPublish() {
5740
const currentPublished = findCurrentPublishedVersion();
5841
console.log(`current published version: ${currentPublished}`);
5942

60-
const version = isRelease ? process.env.VERSION : `${currentPublished}-snapshot.${process.env.BUILD_ID}`;
43+
const version = isRelease ? VERSION : `${currentPublished}-snapshot.${process.env.BUILDKITE_BUILD_NUMBER}`;
6144
console.log(`Publishing version: ${version}`);
6245

6346
tryPublishAndTag(version);
Loading
4.97 KB
Loading
6.34 KB
Loading
10.4 KB
Loading
16.3 KB
Loading

demo/src/screens/MenuStructure.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export const navigationData = {
154154
title: 'Incubator (Experimental)',
155155
screens: [
156156
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
157+
{title: '(New) Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
157158
{title: '(New) TextField', tags: 'text field input', screen: 'unicorn.components.IncubatorTextFieldScreen'},
158159
{title: 'ExpandableOverlay', tags: 'text field expandable input picker', screen: 'unicorn.components.IncubatorExpandableOverlayScreen'},
159160
{title: 'WheelPicker (Incubator)', tags: 'wheel picker spinner experimental', screen: 'unicorn.incubator.WheelPickerScreen'},

0 commit comments

Comments
 (0)