Skip to content

Commit 2feb351

Browse files
committed
Removing excessing comments. Fixing version.
1 parent fdd5805 commit 2feb351

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pod-patch",
3-
"version": "0.0.9",
3+
"version": "0.0.11",
44
"description": "Patching the Pod specfiles in ReactNative projects.",
55
"main": "index.js",
66
"bin":{
@@ -20,7 +20,11 @@
2020
"patch",
2121
"patching"
2222
],
23-
"author": "Max Kalashnikoff",
23+
"author":{
24+
"name" : "Max Kalashnikoff",
25+
"email" : "[email protected]",
26+
"url" : "https://github.com/geekbrother"
27+
},
2428
"license": "MIT",
2529
"bugs": {
2630
"url": "https://github.com/geekbrother/pod-patch/issues"

patch.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
# It download, patches the podspec and updating Podfile
55
# based on the [email protected] files convention.
66
#
7-
# Author: Max Kalashnikov ([email protected])
8-
# Created for: Comm.app
7+
# Author: Max Kalashnikoff ([email protected], [email protected])
8+
# Created for: https://comm.app
99
#
10-
# Usage: npx pod-patch [-h Usage] [-v Version] [-d <path/Podfile> Podfile path ] [-p <path> .patch files directory]
11-
# Run it as npx or bash script from the 'native' directory of
12-
# the ReactNative project.
13-
readonly SCRIPT_VERSION='0.0.8'
10+
# Usage: npx pod-patch -h
11+
readonly SCRIPT_VERSION='0.0.11'
1412
set -e
1513

1614
# Default parameters
@@ -20,15 +18,18 @@ PATCHES_DIR="./ios/pod-patch"
2018
PODFILE_PATH="./ios/Podfile"
2119
## Where the patched files will be placed
2220
readonly PATCHED_SUBDIR=".patched"
21+
## Podspecs GitHub url for Cocoapods repository
22+
readonly PODSPECS_URL="https://raw.githubusercontent.com/CocoaPods/Specs"
2323

2424
# Parsing CLI arguments
2525
while getopts ":hvp:d:" opt; do
2626
case ${opt} in
2727
h)
28-
echo "pod-patch is a Podspec files patching tool based on the .patch files."
29-
echo "Run it as npx or bash script from the 'native' directory of the ReactNative project."
3028
echo "Version: ${SCRIPT_VERSION}"
3129
echo "Usage: npx pod-patch [-h Usage] [-v Version] [-d <path/Podfile> Podfile path ] [-p <path> .patch files directory]"
30+
echo "Description:"
31+
echo "pod-patch is a Podspec files patching tool based on the .patch files."
32+
echo "Run it as npx or bash script from the 'native' directory of the ReactNative project."
3233
exit 0
3334
;;
3435
v)
@@ -48,7 +49,6 @@ shift $((OPTIND - 1))
4849
# Console logging
4950
# Usage: LOG SKIP|INFO|SUCCESS|ERROR "Message text"
5051
function LOG() {
51-
# Console colors
5252
local CRED=$(tput setaf 1)
5353
local CGREEN=$(tput setaf 2)
5454
local CYELLOW=$(tput setaf 3)
@@ -66,7 +66,7 @@ function LOG() {
6666
# Patching function
6767
# Usage: MAKE_PATCH $POD_NAME $POD_VERSION
6868
function MAKE_PATCH() {
69-
# Arguments
69+
# Assigning arguments
7070
local readonly POD_NAME=$1
7171
local POD_VERSION=$2
7272

@@ -108,7 +108,7 @@ function MAKE_PATCH() {
108108
SPEC_PATH=${SPEC_PATH##*/trunk}
109109
SPEC_PATH=${SPEC_PATH%/*}
110110
SPEC_PATH=${SPEC_PATH%/*}
111-
local GITHUB_SPEC_URL="https://raw.githubusercontent.com/CocoaPods/Specs/master${SPEC_PATH}/${POD_VERSION}/${POD_NAME}.podspec.json"
111+
local GITHUB_SPEC_URL="${PODSPECS_URL}/master${SPEC_PATH}/${POD_VERSION}/${POD_NAME}.podspec.json"
112112

113113
local PATCHED_PODSPEC_PATCH="${PATCHES_DIR}/${PATCHED_SUBDIR}/${POD_NAME}/${POD_VERSION}/${POD_NAME}.podspec.json"
114114
rm -f "${PATCHED_PODSPEC_PATCH}"

0 commit comments

Comments
 (0)