From 524b5936cf14dae38fb27a3e0decf036bbfdb459 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Fri, 3 Nov 2023 09:44:40 -0500 Subject: [PATCH] Rename default branch to main --- .github/workflows/ruby.yml | 4 ++-- Jenkinsfile | 4 ++-- config/deploy.rb | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3fe9cb1b..8a3d6536 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: tests: diff --git a/Jenkinsfile b/Jenkinsfile index 87de4a56..6299e18e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { } when { - branch 'master' + branch 'main' } steps { @@ -56,7 +56,7 @@ pipeline { } when { - branch 'master' + branch 'main' } steps { diff --git a/config/deploy.rb b/config/deploy.rb index a5a587bc..df80abbc 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,8 +1,12 @@ set :application, 'digital_stacks' set :repo_url, 'https://github.com/sul-dlss/stacks.git' -# Default branch is :master -ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call unless ENV['DEPLOY'] +# Default branch is :master so we need to update to main +if ENV['DEPLOY'] + set :branch, 'main' +else + ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call +end # Default deploy_to directory is /var/www/my_app set :deploy_to, '/opt/app/stacks/stacks'