-
Notifications
You must be signed in to change notification settings - Fork 11
Develop #102
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
base: legacy-develop
Are you sure you want to change the base?
Develop #102
Changes from all commits
05d4d0b
17497b8
66e29c7
8eb9402
a0618a5
36ab285
f3dab6b
3c09681
0319878
350fda1
af8ce3a
6d6d7f2
9bed7d2
2076ed9
4beb73e
45802ad
1d6f464
c114d4f
dc6351f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Trigger Homebrew Formula Update | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| trigger: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Get latest completion version | ||
| id: completion_version | ||
| run: | | ||
| COMP_VERSION=$(curl -s https://api.github.com/repos/LBEM-CH/gitflow-lbem-completion/tags | jq -r '.[0].name') | ||
| echo "version=${COMP_VERSION}" >> $GITHUB_OUTPUT | ||
| echo "Latest completion version: ${COMP_VERSION}" | ||
|
|
||
| - name: Trigger Homebrew formula update | ||
| uses: peter-evans/repository-dispatch@v3 | ||
| with: | ||
| token: ${{ secrets.HOMEBREW_DISPATCH_TOKEN }} | ||
| repository: LBEM-CH/homebrew-gitflow-lbem | ||
| event-type: main-release | ||
| client-payload: '{"version": "${{ github.ref_name }}", "completion_version": "${{ steps.completion_version.outputs.version }}"}' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| # http://github.com/CJ-Systems/gitflow-cjs | ||
| # | ||
| # Authors: | ||
| # Copyright 2025 LBEM. All rights reserved. | ||
| # Copyright 2003 CJ Systems. All rights reserved. | ||
| # Copyright 2012-2019 Peter van der Does. All rights reserved. | ||
| # | ||
|
|
@@ -102,6 +103,7 @@ usage() { | |
| echo " version Shows version information." | ||
| echo " config Manage your git-flow configuration." | ||
| echo " log Show log deviating from base branch." | ||
| echo " sync Sync current branch with its base (shortcut)." | ||
| echo | ||
| echo "Try 'git flow <subcommand> help' for details." | ||
| } | ||
|
|
@@ -120,15 +122,34 @@ main() { | |
| . "$GITFLOW_DIR/gitflow-common" | ||
|
|
||
| # allow user to request git action logging | ||
| DEFINE_boolean 'showcommands' false 'Show actions taken (git commands)' | ||
| DEFINE_boolean 'showcommands' false 'Show actions taken (git commands)' s | ||
| # but if the user prefers that the logging is always on, | ||
| # use the environmental variables. | ||
| gitflow_override_flag_boolean 'showcommands' 'showcommands' | ||
|
|
||
| # Sanity checks | ||
| SUBCOMMAND="$1"; shift | ||
| if [ "${SUBCOMMAND}" = "finish" ] || [ "${SUBCOMMAND}" = "delete" ] || [ "${SUBCOMMAND}" = "publish" ] || [ "${SUBCOMMAND}" = "rebase" ]; then | ||
| if [ "${SUBCOMMAND}" = "finish" ] || [ "${SUBCOMMAND}" = "delete" ] || [ "${SUBCOMMAND}" = "publish" ] || [ "${SUBCOMMAND}" = "rebase" ] || [ "${SUBCOMMAND}" = "sync" ]; then | ||
| _current_branch=$(git_current_branch) | ||
|
|
||
| # Handle sync on develop/main branches specially | ||
| if [ "${SUBCOMMAND}" = "sync" ]; then | ||
| _develop_branch=$(git config --get gitflow.branch.develop 2>/dev/null) | ||
| _master_branch=$(git config --get gitflow.branch.master 2>/dev/null) | ||
| if [ "${_current_branch}" = "${_develop_branch}" ] || [ "${_current_branch}" = "${_master_branch}" ]; then | ||
| # For develop/main, just do a pull | ||
| echo "Syncing branch '${_current_branch}'..." | ||
| git fetch -q origin || { echo "Could not fetch from origin."; exit 1; } | ||
| if git rev-parse --verify "origin/${_current_branch}" >/dev/null 2>&1; then | ||
| git merge --ff-only "origin/${_current_branch}" || { echo "Could not fast-forward '${_current_branch}'. You may need to merge manually."; exit 1; } | ||
|
Comment on lines
+142
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new top-level Useful? React with 👍 / 👎. |
||
| echo "Branch '${_current_branch}' is now up to date with 'origin/${_current_branch}'." | ||
| else | ||
| echo "No remote tracking branch for '${_current_branch}'." | ||
| fi | ||
| exit 0 | ||
| fi | ||
| fi | ||
|
|
||
| if gitflow_is_prefixed_branch "${_current_branch}"; then | ||
| if startswith "${_current_branch}" $(git config --get gitflow.prefix.feature); then | ||
| SUBACTION="${SUBCOMMAND}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defining top-level
showcommandswith short flag-scollides with subcommands that already use-s(for examplerelease finish --signandhotfix finish --sign). InshFlags, this duplicate short name causes the later flag definition to be skipped, which leads to runtime errors like[: -eq: unexpected operatorwhen those commands callflag sign, and can silently break sign-related behavior.Useful? React with 👍 / 👎.