Skip to content

Commit

Permalink
Prefer using bundle for fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid committed Nov 25, 2024
1 parent 0258956 commit 0b01614
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

source 'https://rubygems.org'

gem 'fastlane'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ PLATFORMS
ruby

DEPENDENCIES
fastlane
fastlane-plugin-badge
fastlane-plugin-xcconfig

Expand Down
49 changes: 28 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,91 @@
.PHONY: all
all: help

.PHONY: install-tools
install-tools:
@echo "Installing tools..."
.PHONY: install-pkgx
install-pkgx:
@echo "Installing pkgx..."
@curl -Ssf https://pkgx.sh | sh &> /dev/null
@echo "... done.\n"

.PHONY: install-bundler
install-bundler:
@echo "Installing bundler..."
@pkgx bundle config set path '.bundle'
@pkgx bundle install
@echo "... done.\n"

.PHONY: fastlane
fastlane: install-tools
@pkgx fastlane
fastlane: install-pkgx install-bundler
@pkgx bundle exec fastlane

.PHONY: archive-demo-ios
archive-demo-ios: install-tools
@pkgx fastlane archive_demo_ios
archive-demo-ios: install-pkgx install-bundler
@pkgx bundle exec fastlane archive_demo_ios

.PHONY: archive-demo-tvos
archive-demo-tvos: install-tools
@pkgx fastlane archive_demo_tvos
archive-demo-tvos: install-pkgx install-bundler
@pkgx bundle exec fastlane archive_demo_tvos

.PHONY: deliver-demo-nightly-ios
deliver-demo-nightly-ios: install-tools
deliver-demo-nightly-ios: install-pkgx
@echo "Delivering demo nightly build for iOS..."
@bundle exec fastlane deliver_demo_nightly_ios
@echo "... done.\n"

.PHONY: deliver-demo-nightly-tvos
deliver-demo-nightly-tvos: install-tools
deliver-demo-nightly-tvos: install-pkgx
@echo "Delivering demo nightly build for tvOS..."
@bundle exec fastlane deliver_demo_nightly_tvos
@echo "... done.\n"

.PHONY: deliver-demo-release-ios
deliver-demo-release-ios: install-tools
deliver-demo-release-ios: install-pkgx
@echo "Delivering demo release build for iOS..."
@bundle exec fastlane deliver_demo_release_ios
@echo "... done.\n"

.PHONY: deliver-demo-release-tvos
deliver-demo-release-tvos: install-tools
deliver-demo-release-tvos: install-pkgx
@echo "Delivering demo release build for tvOS..."
@bundle exec fastlane deliver_demo_release_tvos
@echo "... done.\n"

.PHONY: test-streams-start
test-streams-start: install-tools
test-streams-start: install-pkgx
@echo "Starting test streams"
@Scripts/test-streams.sh -s
@echo "... done.\n"

.PHONY: test-streams-stop
test-streams-stop: install-tools
test-streams-stop: install-pkgx
@echo "Stopping test streams"
@Scripts/test-streams.sh -k
@echo "... done.\n"

.PHONY: test-ios
test-ios: install-tools
test-ios: install-pkgx
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@pkgx +xcodes fastlane test_ios
@Scripts/test-streams.sh -k
@echo "... done.\n"

.PHONY: test-tvos
test-tvos: install-tools
test-tvos: install-pkgx
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@pkgx fastlane test_tvos
@Scripts/test-streams.sh -k
@echo "... done.\n"

.PHONY: check-quality
check-quality: install-tools
check-quality: install-pkgx
@echo "Checking quality..."
@Scripts/check-quality.sh
@echo "... done.\n"

.PHONY: fix-quality
fix-quality: install-tools
fix-quality: install-pkgx
@echo "Fixing quality..."
@Scripts/fix-quality.sh
@echo "... done.\n"
Expand Down Expand Up @@ -127,7 +134,7 @@ find-dead-code:
@echo "... done.\n"

.PHONY: doc
doc: install-tools
doc: install-pkgx
@echo "Generating documentation sets..."
@pkgx fastlane doc
@echo "... done.\n"
Expand All @@ -137,7 +144,7 @@ help:
@echo "The following targets are available:"
@echo ""
@echo " all Default target"
@echo " install-tools Install required tools"
@echo " install-pkgx Install required tools"
@echo ""
@echo " fastlane Run fastlane"
@echo ""
Expand Down

0 comments on commit 0b01614

Please sign in to comment.