From 2d7c1791a34828edc4c372d936dd1526693be107 Mon Sep 17 00:00:00 2001 From: CristhianMotoche Date: Tue, 5 Dec 2023 07:49:41 -0500 Subject: [PATCH] chore: Update default branch name --- README.md | 6 +++--- example/hap.yaml | 2 +- spec/System/HapistranoSpec.hs | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a5fef4a8..34757891 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build](https://github.com/stackbuilders/hapistrano/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/stackbuilders/hapistrano/actions/workflows/build.yml) +[![Build](https://github.com/stackbuilders/hapistrano/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/stackbuilders/hapistrano/actions/workflows/build.yml) [![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-) @@ -46,7 +46,7 @@ host: user@myserver.com port: 2222 # To perform version control operations repo: 'https://github.com/stackbuilders/hapistrano.git' -revision: origin/master +revision: origin/main # To copy the contents of the directory local_directory: '/tmp/my-project' build_script: @@ -151,7 +151,7 @@ Configuration files are parsed using therefore, variable substitution is supported. Considering the following configuration file: ```yaml -revision: "_env:HAPISTRANO_REVISION:origin/master +revision: "_env:HAPISTRANO_REVISION:origin/main ... ``` diff --git a/example/hap.yaml b/example/hap.yaml index 6808b1e3..c5d9d341 100644 --- a/example/hap.yaml +++ b/example/hap.yaml @@ -1,6 +1,6 @@ deploy_path: "/tmp/hap-example" repo: "https://github.com/stackbuilders/hapistrano.git" -revision: "origin/master" +revision: "origin/main" host: vagrant@127.0.0.1 port: 2222 working_directory: example diff --git a/spec/System/HapistranoSpec.hs b/spec/System/HapistranoSpec.hs index 5c14723e..f420c920 100644 --- a/spec/System/HapistranoSpec.hs +++ b/spec/System/HapistranoSpec.hs @@ -200,7 +200,7 @@ spec = do -- let's check that the dir exists and contains the right files (liftIO . readFile . fromAbsFile) (rpath $(mkRelFile "foo.txt")) `shouldReturn` "Foo!\n" - it "deploys properly a branch other than master" $ \(deployPath, repoPath) -> + it "deploys properly a branch other than main" $ \(deployPath, repoPath) -> runHap $ do let task = mkTaskWithCustomRevision deployPath repoPath testBranchName release <- Hap.pushRelease task @@ -437,19 +437,19 @@ withSandbox action = populateTestRepo :: Path Abs Dir -> IO () populateTestRepo path = runHap $ do - justExec path "git init -b master" + justExec path "git init -b main" justExec path "git config --local --replace-all push.default simple" justExec path "git config --local --replace-all user.email hap@hap" justExec path "git config --local --replace-all user.name Hap" justExec path "echo 'Foo!' > foo.txt" justExec path "git add -A" justExec path "git commit -m 'Initial commit'" - -- Add dummy content to a branch that is not master + -- Add dummy content to a branch that is not main justExec path ("git checkout -b " ++ testBranchName) justExec path "echo 'Bar!' > bar.txt" justExec path "git add bar.txt" justExec path "git commit -m 'Added more bars to another branch'" - justExec path "git checkout master" + justExec path "git checkout main" -- | Execute arbitrary commands in the specified directory. justExec :: Path Abs Dir -> String -> Hapistrano () @@ -480,7 +480,7 @@ runHapWithShell shell m = do -- | Make a 'Task' given deploy path and path to the repo. mkTask :: Path Abs Dir -> Path Abs Dir -> Task mkTask deployPath repoPath = - mkTaskWithCustomRevision deployPath repoPath "master" + mkTaskWithCustomRevision deployPath repoPath "main" mkTaskWithCustomRevision :: Path Abs Dir -> Path Abs Dir -> String -> Task mkTaskWithCustomRevision deployPath repoPath revision =