Skip to content

Commit

Permalink
Update references to default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Sep 8, 2022
1 parent 7846ef0 commit b26dcd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
push:
branches:
- master
- main
- validate/*

jobs:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@ SemVer2|The SemVer 2.0 compliant version.

## Example usage

In each example below, replace the `master` branch reference in `@master` with the latest versioned branch available at the time you consume it.
In each example below, replace the `main` branch reference in `@main` with the latest versioned branch available at the time you consume it.
This will help your consumption be stable even as we (may) make breaking changes.
You can always unlock new features in the Action by bumping the `v0.x` to v0.x+1 later.

### Using step outputs

```yaml
- uses: dotnet/nbgv@master
- uses: dotnet/nbgv@main
id: nbgv
- run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}'
```
### Using environment variables
```yaml
- uses: dotnet/nbgv@master
- uses: dotnet/nbgv@main
with:
setAllVars: true
- run: echo "NBGV_SemVer2 $NBGV_SemVer2"
Expand All @@ -79,7 +79,7 @@ You can always unlock new features in the Action by bumping the `v0.x` to v0.x+1
### Stamp the version on a package.json file
```yaml
- uses: dotnet/nbgv@master
- uses: dotnet/nbgv@main
with:
stamp: package.json
```
Expand Down

9 comments on commit b26dcd5

@filipnavara
Copy link
Member

Choose a reason for hiding this comment

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

While the intentions are good this effectively broke everyone's GitHub Actions workflows that used dotnet/nbgv@master already. FYI @AArnott

Not sure if there's anything that can be done to rectify it. We already updated our scripts. Maybe create a master branch and print a warning there that it's no longer being updated?

@filipnavara
Copy link
Member

Choose a reason for hiding this comment

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

...and yeah, I know I should fix the version to a specific one but not everyone does that (and there are often reasons for that): https://cs.github.com/?scopeName=All+repos&scope=&q=dotnet%2Fnbgv%40master

@AArnott
Copy link
Collaborator Author

@AArnott AArnott commented on b26dcd5 Sep 9, 2022

Choose a reason for hiding this comment

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

Shoot. I fully expected GitHub to forward all calls from master to main during the branch rename as it does for most other purposes. That's irritating.

@AArnott
Copy link
Collaborator Author

@AArnott AArnott commented on b26dcd5 Sep 9, 2022

Choose a reason for hiding this comment

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

I brought master back as the default branch. No sense breaking so many people. I've left main there as well so I don't break you (@filipnavara) a second time, but I advise you to switch back to master to get updates. I'll probably delete main soon, or post that notice you suggested.

I'm divided on which branch to keep, but I suspect most people are still on master, and I see no reason to shake that given github doesn't just keep them working.

@filipnavara
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the quick update!

@filipnavara
Copy link
Member

Choose a reason for hiding this comment

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

Note that it would likely be possible to rename to main but keep master as a tag that's updated by GitHub Actions.

@AArnott
Copy link
Collaborator Author

@AArnott AArnott commented on b26dcd5 Sep 9, 2022

Choose a reason for hiding this comment

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

That's interesting. Any sample you could point me to?
Note I don't believe in moving tags (git wasn't designed for that and has no support for updating existing tags), so it would have to be able to keep another branch current.

@filipnavara
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about something like this: https://github.com/filipnavara/mainmaster

Poor man's solution :)

@AArnott
Copy link
Collaborator Author

@AArnott AArnott commented on b26dcd5 Sep 9, 2022

Choose a reason for hiding this comment

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

That's surprisingly simple. Thanks. Not sure I'll do that, but I'll stew on it.

Please sign in to comment.