Skip to content

Commit

Permalink
chore: [#174190519] Change commands for release & build (#2157)
Browse files Browse the repository at this point in the history
* [#173888442] update react-native-webview

* [#173917003] upgrade redux saga to 1.1.3

* fix all typescript errors

* fix delay

* fix lint

* fix lint

* fix saga test

* [#165057751] Migrate Typescript transpile to babel

* [#174318137] upgrade saga signature

* fix types for react-native-text--input-mask

* fix left and right

* fix flagsecure

* fix cancel task

* fix right

* fix typescript errors

* fix contentRefreshControl type

* fix import for babel

* fix yarn lock

* remove test on message cache

* [#174337387] Upgrade react-native-device-info to 5.6.4

* add script to prepare for a new cycle

* write updated package.json

* change command syntax

* fix

* remove test command

* remove console log

Co-authored-by: Matteo Boschi <[email protected]>
  • Loading branch information
fabriziofff and Undermaken authored Aug 24, 2020
1 parent 128ed3d commit b199388
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
"start": "react-native start",
"run-ios": "react-native run-ios",
"run-android": "react-native run-android",
"release": "scripts/changelog/check_git_status.sh && standard-version -t \"\"",
"release:rc": "scripts/changelog/check_git_status.sh && standard-version -t \"\" --prerelease rc",
"pre-cycle": "scripts/changelog/check_git_status.sh && node scripts/changelog/prepare_to_new_cycle.js",
"release-rc": "scripts/changelog/check_git_status.sh && standard-version -t \"\" --prerelease rc",
"start-fix-cycle": "yarn pre-cycle && standard-version -t \"\" --prerelease rc --release-as patch",
"start-release-cycle": "yarn pre-cycle && standard-version -t \"\" --prerelease rc --release-as minor",
"start-breaking-cycle": "yarn pre-cycle && standard-version -t \"\" --prerelease rc --release-as major",
"attach": "react-native attach",
"postinstall": "patch-package && rn-nodeify --install path,buffer && chmod +x ./bin/add-ios-source-maps.sh && ./bin/add-ios-source-maps.sh && chmod +x ./bin/add-ios-env-config.sh && ./bin/add-ios-env-config.sh",
"test": "jest -w 1",
Expand Down
19 changes: 19 additions & 0 deletions scripts/changelog/prepare_to_new_cycle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const fs = require("fs-extra");
const versionModule = require("./version_utility.js");

const packagePath = "package.json";

/***
* Prepare the package.json file for a new fix|release|breaking cycle.
* In order to use the automatic functionality of standard-version, just remove the -rc.x suffix to initiate
* a new cycle.
*/
const prepareToNewCycle = () => {
// read package.json as JSON
const package = JSON.parse(fs.readFileSync(packagePath).toString("utf8"));
// replace the version, removing the rc part
package.version = versionModule.getVersion(package.version);
fs.writeFileSync(packagePath, JSON.stringify(package, undefined, 2));
};

prepareToNewCycle();

0 comments on commit b199388

Please sign in to comment.