Skip to content

Instantly share code, notes, and snippets.

Avatar

marcelkalveram marcelkalveram

View GitHub Profile
View React Native clear all
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/npm-* && rm -rf $TMPDIR/haste-* && rm -rf $TMPDIR/metro-* && rm -rf node_modules && npm install && rm -rf ios/Pods && cd ios && pod cache clean --all && pod repo update && pod install && ./android/gradlew clean -p ./android/ && rm -rf ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData && npm start -- --reset-cache
View react-native-eslintrc.yml
---
parser: babel-eslint
extends:
- rackt
- standard-react
- plugin:eslint-plugin-import/warnings
- plugin:eslint-plugin-import/errors
View envdump.sh
#!/bin/bash
env=""
cat /dev/null > .env
for i in CONTENTFUL_SPACE_ID CONTENTFUL_ACCESS_TOKEN TESTFAIRY_API_TOKEN SEGMENTIOWRITEKEY INTERCOM_KEY INTERCOM_APPID INTERCOM_SECRET_KEY CODEPUSH_KEY; do
echo $i=`printenv $i` >> .env
done
View version-tag.js
'use strict'
let exec = require('child_process').exec
let packagePath = '../package.json'
let packageInfo = require(packagePath)
let version = packageInfo.version
exec(`git tag -a v${version} -m "auto release"`, function (err, stdout, stderr) {
console.log('git result:', stdout)
View version-commit.js
// git commit -m '[version] bump
'use strict'
let exec = require('child_process').exec
let packagePath = '../package.json'
let packageInfo = require(packagePath)
let version = packageInfo.version
View version-increment.js
'use strict'
let fs = require('fs')
let exec = require('child_process').exec
let packagePath = '../package.json'
let versionPropertiesPath = '../android/app/version.properties'
let packageInfo = require(packagePath)
let versionParts = packageInfo.version.split('.')
let buildInt = parseInt(versionParts[2]) + 1
let newVersion = [versionParts[0], versionParts[1], buildInt].join('.')
You can’t perform that action at this time.