Skip to content

Commit

Permalink
Merge pull request #895 from msanguineti/release
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
msanguineti authored Nov 22, 2022
2 parents 8d92fb2 + 7dfea64 commit 1ca79ce
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 449 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ updates:
labels:
- 'dependencies'
- 'npm'
- 'automerge'
- package-ecosystem: github-actions
directory: '/'
schedule:
Expand All @@ -18,4 +17,3 @@ updates:
labels:
- 'dependencies'
- 'github_actions'
- 'automerge'
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js CI

on:
# push:
# branches: [master]
# branches: [main]
pull_request:
branches: [main]

Expand Down
27 changes: 0 additions & 27 deletions .kodiak.toml

This file was deleted.

427 changes: 24 additions & 403 deletions CHANGELOG.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![git-OneFlow](g1-logo.png) <!-- omit in toc -->

[![CodeFactor](https://www.codefactor.io/repository/github/msanguineti/git-oneflow/badge/main)](https://www.codefactor.io/repository/github/msanguineti/git-oneflow/overview/master)
[![CodeFactor](https://www.codefactor.io/repository/github/msanguineti/git-oneflow/badge/main)](https://www.codefactor.io/repository/github/msanguineti/git-oneflow/overview/main)
[![npm](https://badgen.net/npm/v/git-oneflow)](https://www.npmjs.com/package/git-oneflow)
[![code style: prettier](https://badgen.net/badge/code%20style/prettier/ff69b4)](https://prettier.io/) [![Conventional Commits](https://badgen.net/badge/Conventional%20Commits/1.0.0/d4ac20)](https://conventionalcommits.org)
![Dependabot Status](https://badgen.net/github/dependabot/msanguineti/git-oneflow?icon=dependabot)
Expand All @@ -15,15 +15,15 @@ In [this article](https://www.endoflineblog.com/oneflow-a-git-branching-model-an
**_This workflow is not for the uninitiated:_**

1. Heavy use of `rebase`
2. By default, work is off of `master`
2. By default, work is off of `main`
3. ???
4. No Profit :( and surefire way to mess things up quickly and embarrassingly.

For a good overview of why you should _and_ when you shouldn't use rebase read [this](https://git-scm.com/book/en/v2/Git-Branching-Rebasing#_rebase_peril)

I have simply put together some CLI commands to leverage the OneFlow model.

I have remained strictly faithful to how Adam defines the workflow without adding anything fancy (yet). This means that, by default, **_git-OneFlow_** works with one main branch only (`master`) and new features are rebased. Check the [customisation](#customisation) section.
I have remained strictly faithful to how Adam defines the workflow without adding anything fancy (yet). This means that, by default, **_git-OneFlow_** works with one main branch only (`main`) and new features are rebased. Check the [customisation](#customisation) section.

Of course, one-size-fits-all does not always work, therefore, I have implemented all the feature integration options described in the article and both the _one main branch_ and _main and development branches_ models.

Expand Down Expand Up @@ -86,7 +86,7 @@ gof --help

### Node Package Execute - npx

It is possible to run `git-oneflow` directly from the `npm` registry with Node Package Execute:
It is possible to run `git-oneflow` directly (i.e. no local installation) from the `npm` registry with Node Package Execute:

```sh
npx git-oneflow --help
Expand All @@ -100,7 +100,7 @@ npx git-oneflow --help

#### One main branch

`master`
`main`

#### Feature branches

Expand All @@ -118,10 +118,10 @@ Finishing a feature is done by rebasing:
gof finish feature my-feature
# equivalent to...
git checkout feature/my-feature
git rebase -i master
git checkout master
git rebase -i main
git checkout main
git merge --ff-only feature/my-feature
git push origin master
git push origin main
git branch -d feature/my-feature
```

Expand All @@ -142,9 +142,9 @@ gof finish release 2.3.0 -t 2.3.0
# equivalent to...
git checkout release/2.3.0
git tag -a -m '2.3.0' 2.3.0
git checkout master
git checkout main
git merge release/2.3.0
git push --follow-tags origin master
git push --follow-tags origin main
git branch -d release/2.3.0
```

Expand Down Expand Up @@ -172,7 +172,7 @@ gof start feature -c config/my-gof-config.json

| Option | Description | Default | Details |
| -------------------- | ------------------------------------------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `main` | name of the main (production) branch | `master` | must be set to an existing branch name |
| `main` | name of the main (production) branch | `main` | must be set to an existing branch name |
| `development` | name of the development branch | `undefined` | not set or an existing branch name |
| `features` | name of the features branch (prefixed to the feature name) | `feature` | empty string or a valid branch name. This strings works as a branch prefix, e.g. if the chosen feature name is `my-super-feature` the resulting (using the default) branch name for this feature will be `feature/my-super-feature`. An empty string will result in `my-super-feature`. This applies to releases and hotfixes as well. |
| `releases` | name of the releases branch (prefixed to the release name) | `release` | empty string or a valid branch name |
Expand All @@ -197,7 +197,7 @@ this will create `.gitonelfowrc` in the current directory with the following con

```json
{
"main": "master",
"main": "main",
"features": "feature",
"releases": "release",
"hotfixes": "hotfix",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-oneflow",
"version": "1.2.1",
"version": "2.0.0",
"description": "CLI tooling implementing GIT OneFlow branching model",
"bin": {
"gof": "bin/cli.js",
Expand Down Expand Up @@ -132,6 +132,11 @@
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "ci",
"section": "CI/CD",
"hidden": false
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/cmds/finish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const hotfix: GofCommand = {
examples: [
'$ gof finish hotfix 2.3.1 -b bugs',
'$ gof f h 2.3.1',
'$ git-oneflow finish hotfix -o master --no-delete 2.3.1',
'$ git-oneflow finish hotfix -o main --no-delete 2.3.1',
],
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmds/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const hotfix: GofCommand = {
examples: [
'$ gof start hotfix 2.3.1 -b bugs',
'$ gof s h 2.3.1',
'$ git-oneflow start hotfix -r master --no-base 2.3.1',
'$ git-oneflow start hotfix -r main --no-base 2.3.1',
],
}

Expand Down

0 comments on commit 1ca79ce

Please sign in to comment.