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

Update target branch of release script #141

Merged
merged 2 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
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 dev/update-package-storage/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ func fetchUpstream(err error, options updateOptions) error {
return runGitCommand(options, "fetch", "upstream")
}

func checkoutMasterBranch(err error, options updateOptions) error {
func checkoutProductionBranch(err error, options updateOptions) error {
if err != nil {
return err
}
return runGitCommand(options, "checkout", "master")
return runGitCommand(options, "checkout", "production")
}

func rebaseUpstreamMaster(err error, options updateOptions) error {
func rebaseUpstreamProduction(err error, options updateOptions) error {
if err != nil {
return err
}
return runGitCommand(options, "rebase", "upstream/master")
return runGitCommand(options, "rebase", "upstream/production")
}

func addToIndex(err error, options updateOptions, packageName, packageVersion string) error {
Expand Down
6 changes: 3 additions & 3 deletions dev/update-package-storage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func main() {
}

err = fetchUpstream(err, options)
err = checkoutMasterBranch(err, options)
err = rebaseUpstreamMaster(err, options)
err = checkoutProductionBranch(err, options)
err = rebaseUpstreamProduction(err, options)
packageNames, err := listPackages(err, options)
err = reviewPackages(err, options, packageNames, handlePackageChanges)
if err != nil {
Expand All @@ -55,7 +55,7 @@ func handlePackageChanges(err error, options updateOptions, packageName string)
}

packageVersion, err := detectGreatestBuiltPackageVersion(err, options, packageName)
err = checkoutMasterBranch(err, options)
err = checkoutProductionBranch(err, options)
released, err := checkIfPackageReleased(err, options, packageName, packageVersion)
if released {
return nil
Expand Down