Skip to content

Commit

Permalink
extended bump version file option
Browse files Browse the repository at this point in the history
  • Loading branch information
i.o.novikov committed Mar 30, 2022
1 parent 4162338 commit ee73f42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,19 @@ source "https://rubygems.org"
gem "cocoapods", "~> 1.11.3"
gem 'fastlane', '~> 2.204.3'
gem 'fastlane-plugin-changelog'
gem 'rubocop', '~> 0.93.1' # if exists
gem 'rubocop-require_tools'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
```

2. `fastlane/Pluginfile`

```
gem 'fastlane-plugin-changelog'
```
3. `fastlane/Fastfile`
2`fastlane/Fastfile`

```ruby
import_from_git(
url: "https://github.com/tinkoff-mobile-tech/workflows.git",
branch: "master",
path: "fastlane/Fastfile"
)
```
Expand All @@ -126,7 +120,6 @@ jobs:
with:
xcodeproj_path: "TinkoffID.xcodeproj"
scheme_name: "TinkoffID-Package"
podspec_name: "TinkoffID.podspec"
```

it calls `lint_fastfile`, `pod_lib_lint`, `swift package generate-xcodeproj`, `xcodebuild clean build`.
Expand All @@ -150,7 +143,6 @@ jobs:
with:
xcodeproj_path: "TinkoffID.xcodeproj"
scheme_name: "TinkoffID-Package"
podspec_name: "TinkoffID.podspec"
bump_type: ${{ inputs.bump_type }}
secrets:
cocapods_trunk_token: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
Expand Down
8 changes: 7 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ lane :release do |options|
version = version_bump_podspec(path: podspec_name, bump_type: bump_type)
end

add_files = extend_bump_version(version: version)

text = read_changelog
changelog = File.open('new_changes.txt', "w")
changelog.puts(text)
Expand All @@ -24,7 +26,7 @@ lane :release do |options|
stamp_changelog(section_identifier: version)

# Creating release commit and tag
git_commit(path: ["CHANGELOG.md"] + podspec_names, message: "Release #{version}")
git_commit(path: ["CHANGELOG.md"] + podspec_names + add_files, message: "Release #{version}", skip_git_hooks: true)
add_git_tag(tag: version)

# Pushing to remote repo
Expand All @@ -36,6 +38,10 @@ lane :release do |options|
end
end

lane :extend_bump_version do |options|
[]
end

lane :check do
# Linting ruby files
lint_fastfile
Expand Down

0 comments on commit ee73f42

Please sign in to comment.