Skip to content

Commit 9bc18dc

Browse files
committed
Unify version to xcconfig
1 parent eae57ed commit 9bc18dc

10 files changed

Lines changed: 13 additions & 74 deletions

File tree

Dangerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
1111
# Warn no CHANGELOG
1212
warn("No CHANGELOG changes made") if git.lines_of_code > 50 && !git.modified_files.include?("CHANGELOG.md") && !declared_trivial
1313

14-
# Warn pod spec changes
15-
warn("RxCocoa.podspec changed") if git.modified_files.include?("RxCocoa.podspec")
16-
warn("RxSwift.podspec changed") if git.modified_files.include?("RxSwift.podspec")
17-
warn("RxTest.podspec changed") if git.modified_files.include?("RxTest.podspec")
18-
warn("RxBlocking.podspec changed") if git.modified_files.include?("RxBlocking.podspec")
19-
2014
# Warn summary on pull request
2115
if github.pr_body.length < 5
2216
warn "Please provide a summary in the Pull Request description"

Rx.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RxBlocking/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>6.9.0</string>
18+
<string>$(RX_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxCocoa/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>6.9.0</string>
18+
<string>$(RX_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxRelay/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>6.9.0</string>
18+
<string>$(RX_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxSwift/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>6.9.0</string>
18+
<string>$(RX_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxTest/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>6.9.0</string>
18+
<string>$(RX_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Version.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RX_VERSION = 6.9.0

scripts/all-tests.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ elif [ "$1" == "SPM" ]; then
7070
TEST_SPM=1
7171
fi
7272

73-
if [ "${RELEASE_TEST}" -eq 1 ]; then
74-
VALIDATE_PODS=${VALIDATE_PODS:-1}
75-
else
76-
VALIDATE_PODS=${VALIDATE_PODS:-0}
77-
fi
78-
7973
RUN_DEVICE_TESTS=${RUN_DEVICE_TESTS:-1}
8074

8175
function ensureVersionEqual() {
@@ -93,17 +87,16 @@ function ensureNoGitChanges() {
9387
}
9488

9589
function checkPlistVersions() {
96-
RXSWIFT_VERSION=`cat RxSwift.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
90+
RXSWIFT_VERSION=`grep "^RX_VERSION" Version.xcconfig | cut -d '=' -f 2 | tr -d ' '`
9791
echo "RxSwift version: ${RXSWIFT_VERSION}"
9892
PROJECTS=(RxSwift RxCocoa RxRelay RxBlocking RxTest)
9993
for project in ${PROJECTS[@]}
10094
do
10195
echo "Checking version for ${project}"
102-
PODSPEC_VERSION=`cat $project.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
103-
ensureVersionEqual "$RXSWIFT_VERSION" "$PODSPEC_VERSION" "${project} version not equal"
10496
PLIST_VERSION=`defaults read "\`pwd\`/${project}/Info.plist" CFBundleShortVersionString`
105-
if ! ( [[ ${RXSWIFT_VERSION} = *"-"* ]] || [[ "${PLIST_VERSION}" == "${RXSWIFT_VERSION}" ]] ) ; then
106-
echo "Invalid version for `pwd`/${project}/Info.plist: ${PLIST_VERSION}"
97+
# Check that Info.plist uses the RX_VERSION variable reference
98+
if [[ "${PLIST_VERSION}" != '$(RX_VERSION)' ]]; then
99+
echo "Invalid version for `pwd`/${project}/Info.plist: ${PLIST_VERSION} (expected \$(RX_VERSION))"
107100
exit -1
108101
fi
109102
done
@@ -129,10 +122,6 @@ if [ "${RELEASE_TEST}" -eq 1 ]; then
129122
CONFIGURATIONS=(Debug Release Release-Tests)
130123
fi
131124

132-
if [ "${VALIDATE_PODS}" -eq 1 ]; then
133-
SWIFT_VERSION=5.0 scripts/validate-podspec.sh
134-
fi
135-
136125
if [ "${VALIDATE_IOS_EXAMPLE}" -eq 1 ]; then
137126
if [[ "${UNIX_NAME}" == "${DARWIN}" ]]; then
138127
for scheme in "RxExample-iOS"

scripts/validate-podspec.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)