Skip to content

Commit

Permalink
Merge pull request #41 from square/dhaval/setupForAlpha2Release
Browse files Browse the repository at this point in the history
Fixing Release Instructions
  • Loading branch information
dhavalshreyas authored Jul 10, 2020
2 parents f975a9a + a2382e5 commit 3f25c00
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 35 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'https://rubygems.org'

gem 'cocoapods-trunk', '>=1.5.0'
gem 'cocoapods'

gem 'cocoapods-generate'
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ GEM
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
Expand Down Expand Up @@ -89,6 +89,7 @@ PLATFORMS
DEPENDENCIES
cocoapods
cocoapods-generate
cocoapods-trunk (>= 1.5.0)

BUNDLED WITH
2.1.4
52 changes: 23 additions & 29 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

---

***Before you begin:*** *Please make sure you are set up with
***Before you begin:*** Please make sure you are set up with
[`pod trunk`](https://guides.cocoapods.org/making/getting-setup-with-trunk.html) and your CocoaPods
account is a contributor to both the Workflow and WorkflowUI pods. If you need to be added as a
contributor, please [open a ticket requesting access](https://github.com/square/workflow-swift/issues/new),
and assign it to @bencochran or @aquageek.*
and assign it to @bencochran, @aquageek or @dhavalshreyas.

---
1. Merge an update of [the change log](CHANGELOG.md) with the changes since the last release.

1. Merge an update of [the change log](CHANGELOG.md) with changes since the last release.

1. If there has been a **Breaking Change**, since last release, update `VERSION` and bump up `MAJOR`.

1. Make sure you're on the `main` branch (or fix branch, e.g. `v0.1-fixes`).

Expand All @@ -21,15 +24,26 @@ and assign it to @bencochran or @aquageek.*
git tag v0.1.0
```

1. Push your commits and tag:
```
git push origin main
# or git push origin fix-branch
git push origin v0.1.0
```

1. Publish to CocoaPods:
```bash
bundle exec pod trunk push Workflow.podspec
bundle exec pod trunk push WorkflowTesting.podspec
bundle exec pod trunk push WorkflowUI.podspec
bundle exec pod trunk push Workflow.podspec --synchronous
bundle exec pod trunk push WorkflowTesting.podspec --synchronous
bundle exec pod trunk push WorkflowReactiveSwift.podspec --synchronous
bundle exec pod trunk push WorkflowUI.podspec --synchronous
bundle exec pod trunk push WorkflowRxSwift.podspec --synchronous
bundle exec pod trunk push WorkflowReactiveSwiftTesting.podspec --synchronous
bundle exec pod trunk push WorkflowRxSwiftTesting.podspec --synchronous
bundle exec pod trunk push WorkflowSwiftUI.podspec --synchronous
```

1. Bump the version
- **Swift:** Update `s.version` in `*.podspec` to the new version, e.g. `0.2.0`.
1. Bump the version: Update `VERSION` to the new version, e.g. `0.2.0`.

1. Commit the new snapshot version:
```
Expand Down Expand Up @@ -60,24 +74,4 @@ and assign it to @bencochran or @aquageek.*
git merge --no-ff v0.1-fixes
# Resolve conflicts. Accept main's versions of gradle.properties and podspecs.
git push origin main
```

1. Publish the website. See https://github.com/square/workflow/blob/main/RELEASING.md.

### Validating Markdown

Since all of our high-level documentation is written in Markdown, we run a linter in CI to ensure
we use consistent formatting. Lint errors will fail your PR builds, so to run locally, install
[markdownlint](https://github.com/markdownlint/markdownlint):

```bash
gem install mdl
```

Run the linter using the `lint_docs.sh`:

```bash
./lint_docs.sh
```

Rules can be configured by editing `.markdownlint.rb`.
```
1 change: 1 addition & 0 deletions WorkflowUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Pod::Spec.new do |s|
s.source_files = 'WorkflowUI/Sources/**/*.swift'

s.dependency 'Workflow', "#{s.version}"
s.dependency 'WorkflowReactiveSwift', "#{s.version}"

s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'WorkflowUI/Tests/**/*.swift'
Expand Down
10 changes: 5 additions & 5 deletions version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load('VERSION')

pre_release_append = ((PRE_RELEASE_IDENTIFIER ||= "") != "") ? "-"+PRE_RELEASE_IDENTIFIER : ""

WORKFLOW_VERSION="#{MAJOR}.#{MINOR}.#{PATCH}#{pre_release_append}"
if !Object.const_defined?(:WORKFLOW_VERSION)
load('VERSION')
pre_release_append = ((PRE_RELEASE_IDENTIFIER ||= "") != "") ? "-"+PRE_RELEASE_IDENTIFIER : ""
WORKFLOW_VERSION="#{MAJOR}.#{MINOR}.#{PATCH}#{pre_release_append}"
end

0 comments on commit 3f25c00

Please sign in to comment.