Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch default branch from 'master' to 'main' #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/Publish/API/DeploymentMethod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public struct DeploymentMethod<Site: Website> {
public extension DeploymentMethod {
/// Deploy a website to a given remote using Git.
/// - parameter remote: The full address of the remote to deploy to.
/// - parameter branch: The branch to push to and pull from (default is master).
static func git(_ remote: String, branch: String = "master") -> Self {
/// - parameter branch: The branch to push to and pull from (default is main).
static func git(_ remote: String, branch: String = "main") -> Self {
DeploymentMethod(name: "Git (\(remote))") { context in
let folder = try context.createDeploymentFolder(withPrefix: "Git") { folder in
if !folder.containsSubfolder(named: ".git") {
Expand Down Expand Up @@ -88,9 +88,9 @@ public extension DeploymentMethod {

/// Deploy a website to a given GitHub repository.
/// - parameter repository: The full name of the repository (including its username).
/// - parameter branch: The branch to push to and pull from (default is master).
/// - parameter branch: The branch to push to and pull from (default is main).
/// - parameter useSSH: Whether an SSH connection should be used (preferred).
static func gitHub(_ repository: String, branch: String = "master", useSSH: Bool = true) -> Self {
static func gitHub(_ repository: String, branch: String = "main", useSSH: Bool = true) -> Self {
let prefix = useSSH ? "git@github.com:" : "https://github.com/"
return git("\(prefix)\(repository).git", branch: branch)
}
Expand Down