Skip to content

Commit

Permalink
chore: updated build number
Browse files Browse the repository at this point in the history
  • Loading branch information
vkaltyrin committed Dec 13, 2024
1 parent 705ee23 commit 1be4705
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
4 changes: 2 additions & 2 deletions SDDSDemoApp/SDDSDemoApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_ASSET_PATHS = "\"SDDSDemoApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -825,7 +825,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_ASSET_PATHS = "\"SDDSDemoApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KDMYYG676V;
Expand Down
30 changes: 9 additions & 21 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ default_platform(:ios)

platform :ios do
lane :build_and_upload do
# Проверка переменных окружения
def check_env_variable(key)
if ENV[key].nil? || ENV[key].empty?
UI.user_error!("Missing environment variable: #{key}")
Expand All @@ -15,29 +14,19 @@ platform :ios do

UI.message("All required environment variables are set!")

app_identifier = "com.sd.SDDSDemo"

# Получение последнего номера сборки из App Store Connect
latest_build_number = app_store_build_number(
app_identifier: app_identifier,
version: get_version_number(
xcodeproj: "SDDSDemoApp/SDDSDemoApp.xcodeproj",
target: "SDDSDemoApp"
),
api_key: {
key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"],
issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
key: ENV["APP_STORE_CONNECT_API_KEY"]
}
# Получение текущего номера сборки из Xcode проекта
current_build_number = get_build_number(
xcodeproj: "SDDSDemoApp/SDDSDemoApp.xcodeproj"
)
next_build_number = (current_build_number.to_i + 1).to_s

next_build_number = (latest_build_number.to_i + 1).to_s
# Увеличиваем номер сборки в Xcode проекте
increment_build_number(
build_number: next_build_number,
xcodeproj: "SDDSDemoApp/SDDSDemoApp.xcodeproj"
)

# Update Info.plist
# Получаем текущую версию из Info.plist
version = get_version_number(
xcodeproj: "SDDSDemoApp/SDDSDemoApp.xcodeproj",
target: "SDDSDemoApp"
Expand All @@ -49,16 +38,15 @@ platform :ios do
ENV["VERSION"] = version
version = ENV["VERSION"]

# Check current branch
# Определяем имя сборки в зависимости от ветки
branch_name = git_branch

build_name = if branch_name == "develop"
"SDDSDemo #{version} #{next_build_number} (dev)"
else
"SDDSDemo"
end

# Build app
# Сборка приложения
UI.message("Building app...")
build_app(
scheme: "SDDSDemoApp",
Expand All @@ -75,7 +63,7 @@ platform :ios do
output_name: build_name
)

# Upload to TestFlight
# Загрузка в TestFlight
UI.message("Uploading to TestFlight...")
upload_to_testflight(
api_key: {
Expand Down

0 comments on commit 1be4705

Please sign in to comment.