remorses / bump-version

Action to bump version files
36 stars 12 forks source link

Specify reconciliation before pulling to avoid error #16

Closed chamini2 closed 2 years ago

chamini2 commented 2 years ago

In the git project, the warning was turned into a fatal error: https://github.com/git/git/commit/031e2f7ae195069d00d21cde906fce5b0318dbdd#diff-0e7db391c63d3bfd3f16472a3137dadf0281a91ae0de4c6eb95cb984230b9335R1072

Before it used to output:

git pull --no-edit --commit --strategy-option theirs publisher main
From https://github.com/***/***
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> publisher/main
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.
git push publisher main

And now it runs like:

git pull --no-edit --commit --strategy-option theirs publisher main
From https://github.com/***/***
 * branch            main       -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
Error: The process 'git' failed with exit code 128
chamini2 commented 2 years ago

Also, optional chaining was introduced in Typescript 3.7, so I updated the dependency: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html

chamini2 commented 2 years ago

Also, I noticed you have the node_modules directory checked in. I think this is not normal practice, but I did the same. Let me know if I should just remove the node_modules.

remorses commented 2 years ago

Thank you for the PR

I fixed this problem in the js branch just before seeing your PR sorry 😭 The fix is already in the js branch

the node_modules foldre is committed because github actions needs all files necessary to run the script to be present in the repo