forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush-pod.sh
executable file
·36 lines (30 loc) · 934 Bytes
/
push-pod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# This script pushes a new version of the podspec to either the public specs (for releases), or the private AK Specs repo (for regular staging)
if test $# -lt 1;
then
echo "Usage: $0 release|staging"
exit 1
fi
VER=$(cat VERSION)
if test $1 = release;
then
SOURCE="https://files.audiokit.io/releases/v${VER}/AudioKit.framework.zip"
elif test $1 = staging;
then
SOURCE="https://files.audiokit.io/staging/v${VER}/AudioKit.framework.zip"
else
echo "Invalid parameter: $1"
exit 1
fi
# Make sure you have added the AK Specs repo as ak-specs
if ! test -d ~/.cocoapods/repos/ak-specs;
then
pod repo add ak-specs [email protected]:AudioKit/Specs.git
fi
cat AudioKit.podspec.json.tmpl | sed "s/__AK_VERSION__/$VER/" | sed "s|__AK_SOURCE__|$SOURCE|" > AudioKit.podspec.json
if test $1 = release;
then
pod trunk push AudioKit.podspec.json --verbose
else # Staging
pod repo push ak-specs AudioKit.podspec.json --verbose
fi