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

Checkout branch in CI process #5407

Merged
merged 1 commit into from
Jan 16, 2021

Conversation

XiangRongLin
Copy link
Collaborator

@XiangRongLin XiangRongLin commented Jan 14, 2021

What is it?

  • Meta improvement to the project (dev facing)

Description of the changes in your PR

Due diligence

@XiangRongLin XiangRongLin marked this pull request as draft January 14, 2021 09:36
@XiangRongLin
Copy link
Collaborator Author

Currently does not work because it is trying to fetch the branch from the NewPipe repo. But the branch exists on the repo of the PR opener, which usually is not NewPipe

@TobiGr
Copy link
Member

TobiGr commented Jan 14, 2021

What about

git branch ${VAR_FOR_BRANCH_NAME}

@XiangRongLin
Copy link
Collaborator Author

that will throw an error if the branch already exists. which can occur if the PR comes from the newpipe repo itself or comes from the dev branch of another repo.

I don't know if that aborts the run, but still not ideal

@XiangRongLin XiangRongLin reopened this Jan 14, 2021
This way the debug build app id contains the branch name again.
@XiangRongLin XiangRongLin marked this pull request as ready for review January 14, 2021 18:46
@Stypox
Copy link
Member

Stypox commented Jan 14, 2021

Then what about deleting the branch if it exists and then doing git branch?

@XiangRongLin
Copy link
Collaborator Author

@TobiGr @Stypox I went with checkout -B now. in the normal cases where the branch does not exists it works like checkout -b. In the cases where it does exist, it moves that branch to the current position and checks it out.

see my updated pr body


Then what about deleting the branch if it exists and then doing git branch?

I didn't want to figure out how to do that in shell script

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me!

@XiangRongLin XiangRongLin merged commit 5b58850 into TeamNewPipe:dev Jan 16, 2021
@XiangRongLin XiangRongLin deleted the ci_checkout_branch branch January 16, 2021 13:31
This was referenced Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants