Skip to content

Commit

Permalink
[Chore] Health-Food-Me#225 - Fastfile에 버전 관리 lane 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
L-j-h-c committed Sep 4, 2022
1 parent e24d1cf commit 922c0a8
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@
CODE_SIGN_ENTITLEMENTS = HealthFoodMe/HealthFoodMe.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2022.0905.0018;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = FY8N9XTH66;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -2525,7 +2525,7 @@
CODE_SIGN_ENTITLEMENTS = HealthFoodMe/HealthFoodMe.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2022.0905.0018;
DEVELOPMENT_TEAM = FY8N9XTH66;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = HealthFoodMe/Info.plist;
Expand Down
19 changes: 19 additions & 0 deletions HealthFoodMe/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,23 @@ platform :ios do
build_app(workspace: "HealthFoodMe.xcworkspace", scheme: "HealthFoodMe")
upload_to_testflight
end

lane :set_version do |options|
case options[:version]
when "major", "minor", "patch"
increment_version_number(bump_type: options[:version])
else
increment_version_number(version_number: options[:version])
end

increment_build_number(
build_number: Time.new.strftime("%Y.%m%d.%H%M") # 2021년 4월 17일 14시 53분 -> 2021.0417.1453
)
version_number = "#{lane_context[SharedValues::VERSION_NUMBER]}(#{lane_context[SharedValues::BUILD_NUMBER]})"
commit_version_bump(
message: "Update version - #{version_number}"
)
add_git_tag(tag: "v#{version_number}")
push_to_git_remote
end
end
40 changes: 40 additions & 0 deletions HealthFoodMe/fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

## iOS

### ios beta

```sh
[bundle exec] fastlane ios beta
```

Push a new beta build to TestFlight

### ios set_version

```sh
[bundle exec] fastlane ios set_version
```



----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

0 comments on commit 922c0a8

Please sign in to comment.