Created
February 3, 2020 07:37
-
-
Save love8587/2272c7b241ab99fe88cd797de593f6b0 to your computer and use it in GitHub Desktop.
react native CI/CD - versioning automation increment whenever app release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a sample build configuration for JavaScript. | |
| # Check our guides at https://confluence.atlassian.com/x/14UWN for more examples. | |
| # Only use spaces to indent your .yml configuration. | |
| # ----- | |
| # You can specify a custom docker image from Docker Hub as your build environment. | |
| image: node:10.16.0 | |
| definitions: | |
| after-script: &merge-to-staging-with-versionup | |
| - apt-get update -y | |
| - apt-get install -y git | |
| - git fetch --unshallow | |
| - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | |
| - git fetch origin | |
| - git checkout --track origin/staging | |
| - git merge $BITBUCKET_BRANCH -m "Automated Merge by pipelines branch '$BITBUCKET_BRANCH' into 'staging' [SKIP CI]" | |
| - npm version patch | |
| - npm run react-native-version | |
| - git status | |
| - git push origin | |
| - git push origin --tags | |
| pipelines: | |
| branches: | |
| master: | |
| - step: | |
| name: npm version and app-version increment | |
| caches: | |
| - node | |
| script: | |
| - npm install | |
| after-script: *merge-to-staging-with-versionup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "scripts": { | |
| "android": "react-native run-android", | |
| "ios": "react-native run-ios", | |
| "pod": "cd ios && pod install --repo-update && cd ..", | |
| "postuninstall": "npm run pod", | |
| "prepare": "npm run pod", | |
| "start": "react-native start", | |
| "test": "jest", | |
| "lint": "eslint . --ext .js,.jsx,.ts,.tsx", | |
| "lint-fix": "npm run lint -- --fix", | |
| "react-native-version": "react-native-version" | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@stovmascript I think that's not necessary. let me know why you need that. That's not hard to share of that.