-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathversion.sh
22 lines (18 loc) · 884 Bytes
/
version.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
for LIBRARY_NAME in bip39
do
CURR_VERSION=${LIBRARY_NAME}-v`awk '/^version: /{print $2}' packages/${LIBRARY_NAME}/pubspec.yaml`
# iOS & macOS
APPLE_HEADER="release_tag_name = '$CURR_VERSION' # generated; do not edit"
sed -i.bak "1 s/.*/$APPLE_HEADER/" packages/${LIBRARY_NAME}/ios/${LIBRARY_NAME}.podspec
sed -i.bak "1 s/.*/$APPLE_HEADER/" packages/${LIBRARY_NAME}/macos/${LIBRARY_NAME}.podspec
rm packages/${LIBRARY_NAME}/macos/*.bak packages/${LIBRARY_NAME}/ios/*.bak
# CMake platforms (Linux, Windows, and Android)
CMAKE_HEADER="set(LibraryVersion \"$CURR_VERSION\") # generated; do not edit"
for CMAKE_PLATFORM in android linux windows
do
sed -i.bak "1 s/.*/$CMAKE_HEADER/" packages/${LIBRARY_NAME}/${CMAKE_PLATFORM}/CMakeLists.txt
rm packages/${LIBRARY_NAME}/${CMAKE_PLATFORM}/*.bak
done
git add packages/${LIBRARY_NAME}/
done