This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automating repacking script and github tagging after publish.
- Loading branch information
1 parent
66b9f53
commit 1bb30f6
Showing
3 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
#! /bin/sh | ||
|
||
PACKAGE_VERSION=$(cat package.json \ | ||
| grep version \ | ||
| head -1 \ | ||
| awk -F: '{ print $2 }' \ | ||
| sed 's/[",]//g' \ | ||
| tr -d '[[:space:]]') | ||
|
||
NPMFILE="../react-native-ble-advertiser-$PACKAGE_VERSION.tgz" | ||
|
||
echo Packing $PACKAGE_VERSION into $NPMFILE | ||
|
||
npm pack | ||
|
||
echo Installing new Lib on Example app | ||
|
||
cd example | ||
npm i ../react-native-ble-advertiser-0.0.13.tgz | ||
|
||
if [ $1 = "android" ] | ||
then | ||
npx react-native run-android | ||
else | ||
cd ios | ||
pod install | ||
cd .. | ||
npx react-native run-ios | ||
fi | ||
npm i $NPMFILE | ||
cd ios | ||
pod install | ||
cd .. | ||
|
||
if [ -z "$1" ] then | ||
echo Running on "$1" | ||
case "$1" in | ||
"android") npx react-native run-android | ||
;; | ||
"ios") npx react-native run-ios --device | ||
;; | ||
esac | ||
fi | ||
|
||
cd .. |