Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Commit

Permalink
Adds podspec and scripts to release and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
arlo-egg committed Jul 4, 2017
1 parent e05a921 commit 4d06726
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,20 @@ $ pxctest \
--testrun derivedData/Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.1-i386.xctestrun
```

## Release version update

1. Update `Info.plist` > `CFBundleShortVersionString`
2. Update `CHANGELOG.md`
3. Ensure the latest stable Xcode version is installed and `xcode-select`ed.
4. From project root directory run `./scripts/release.sh`
5. Create a GitHub release: https://github.com/plu/pxctest/releases/new
* Specify the tag you just pushed in the dropdown.
* Set the release title to the new version number.
* Add the changelog section to the release description text box.
* Upload the portable zip you just built to the GitHub release binaries.
* Click "Publish release".
6. Publish to Homebrew and CocoaPods: `./scripts/publish.sh`

## License

[MIT](LICENSE)
10 changes: 10 additions & 0 deletions pxctest.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Pod::Spec.new do |s|
s.name = 'pxctest'
s.version = `./scripts/get_version.sh`
s.summary = 'Execute tests in parallel on multiple iOS Simulators'
s.homepage = 'https://github.com/plu/pxctest'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Johannes Plunien' => 'plu@pqpq.de' }
s.source = { :http => "#{s.homepage}/releases/download/#{s.version}/portable_pxctest.zip" }
s.preserve_paths = '*'
end
8 changes: 8 additions & 0 deletions scripts/get_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

PXCTEST_PLIST='pxctest/info.plist'
NEW_VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$PXCTEST_PLIST")

echo "$NEW_VERSION"
6 changes: 6 additions & 0 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

brew update && brew bump-formula-pr --tag=$(shell git describe --tags) --revision=$(shell git rev-parse HEAD) pxctest
pod trunk push pxctest.podspec
46 changes: 46 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

set -e

PXCTEST_PLIST='pxctest/info.plist'
NEW_VERSION="$(./scripts/get_version.sh)"

echo "New version is $NEW_VERSION"

NEW_RELEASE_DIR="build/releases/$NEW_VERSION"

echo "Cleaning release directory"

rm -rf "$NEW_RELEASE_DIR"

BUILT_BIN_NAME='pxctest'
BUILT_BIN_PATH="$NEW_RELEASE_DIR/bin/$BUILT_BIN_NAME"
BUILT_FRAMEWORK_NAME='PXCTestKit.framework'
BUILT_FRAMEWORK_PATH="$NEW_RELEASE_DIR/Frameworks/$BUILT_FRAMEWORK_NAME"
LICENSE_NAME='LICENSE'
LICENSE_PATH="./$LICENSE_NAME"

echo "Building to $NEW_RELEASE_DIR"

./scripts/build.sh "$NEW_RELEASE_DIR"

echo "Creating portable release"

PORTABLE_RELEASE_DIR="$NEW_RELEASE_DIR/portable_pxctest"

mkdir -p "$PORTABLE_RELEASE_DIR"

cp -f "$BUILT_BIN_PATH" "$PORTABLE_RELEASE_DIR"
cp -fR "$BUILT_FRAMEWORK_PATH" "$PORTABLE_RELEASE_DIR"
cp -f "$LICENSE_PATH" "$PORTABLE_RELEASE_DIR"

(cd "$PORTABLE_RELEASE_DIR"; zip -yr - "$BUILT_BIN_NAME" "$BUILT_FRAMEWORK_NAME" "$LICENSE_NAME") > "$PORTABLE_RELEASE_DIR.zip"

echo "Tagging release"

git commit -a -m "release $NEW_VERSION"
git tag -a "$NEW_VERSION" -m "release $NEW_VERSION"
git push origin master
git push origin "$NEW_VERSION"

echo "Release complete; see https://github.com/plu/pxctest#release-version-update for next steps."

0 comments on commit 4d06726

Please sign in to comment.