Skip to content

Commit

Permalink
Adapt to new Solidus default branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
waiting-for-dev committed May 22, 2023
1 parent c9c4bc4 commit 52837a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
parameters:
solidus:
type: string
default: master
default: main
db:
type: string
default: "postgres"
Expand All @@ -32,7 +32,7 @@ workflows:
- run-specs:
name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>"
matrix:
parameters: { solidus: ["master"], ruby: ["3.2"], db: ["postgres"] }
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
- run-specs:
name: *name
matrix:
Expand All @@ -42,7 +42,7 @@ workflows:
matrix:
parameters: { solidus: ["older"], ruby: ["3.0"], db: ["sqlite"] }

"Weekly run specs against master":
"Weekly run specs against main":
triggers:
- schedule:
cron: "0 0 * * 4" # every Thursday
Expand All @@ -54,7 +54,7 @@ workflows:
- run-specs:
name: *name
matrix:
parameters: { solidus: ["master"], ruby: ["3.2"], db: ["postgres"] }
parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] }
- run-specs:
name: *name
matrix:
Expand Down
21 changes: 12 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
solidus_git, solidus_frontend_git = if (branch == 'master') || (branch >= 'v3.2')
%w[solidusio/solidus solidusio/solidus_frontend]
else
%w[solidusio/solidus] * 2
end
gem 'solidus', github: solidus_git, branch: branch
gem 'solidus_frontend', github: solidus_frontend_git, branch: branch
branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
gem 'solidus', github: 'solidusio/solidus', branch: branch

# The solidus_frontend gem has been pulled out since v3.2
if branch >= 'v3.2'
gem 'solidus_frontend'
elsif branch == 'main'
gem 'solidus_frontend', github: 'solidusio/solidus_frontend'
else
gem 'solidus_frontend', github: 'solidusio/solidus', branch: branch
end

# Needed to help Bundler figure out how to resolve dependencies,
# otherwise it takes forever to resolve them.
Expand All @@ -27,7 +30,7 @@ else
end

group :development, :test do
gem 'i18n-tasks', '~> 0.9' if branch == 'master'
gem 'i18n-tasks', '~> 0.9' if branch == 'main'
end

gemspec
Expand Down

0 comments on commit 52837a1

Please sign in to comment.