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

[BUG] Git not found when running post-bump hook #318

Closed
sravioli opened this issue Sep 27, 2023 · 4 comments
Closed

[BUG] Git not found when running post-bump hook #318

sravioli opened this issue Sep 27, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sravioli
Copy link

Describe the bug
Cannot execute post-bump hooks. As shown in the image, cog can't find git.

image

To Reproduce
Steps to reproduce the behavior:

  • run cog bump (--auto/--patch/...)

Expected behavior
Cog bumps the git tag without error.

Additional context
.

@sravioli sravioli added the bug Something isn't working label Sep 27, 2023
@oknozor
Copy link
Collaborator

oknozor commented Sep 27, 2023

Can you provide some context ?

@sravioli
Copy link
Author

Can you provide some context ?

i really do not know why it does this. I run windows11. I can provide the cog.toml:

# A list of glob patterns describing branches on which semver bump are allowed
branch_whitelist = ["main"]
ignore_merge_commits = true
pre_bump_hooks = []
post_bump_hooks = ["git push", "git push origin {{version}}"]

[commit_types]
hotfix = { changelog_title = "Hotfixes" }
release = { changelog_title = "Releases" }

[changelog]
path = "CHANGELOG.md"
template = "remote"
remote = "github.com"
repository = "knowledge-base"
owner = "sRavioli"
authors = [{ username = "sRavioli", signature = "Simone Fidanza" }]

# [bump_profiles]

# [packages]

and systeminfo:

> systeminfo

Host Name:                 HELIUM
OS Name:                   Microsoft Windows 11 Pro for Workstations
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          fsimone2002@proton.me
Registered Organization:   N/A
Product ID:                00391-70000-00000-AA702
Original Install Date:     05/06/2023, 21:00:26
System Boot Time:          27/09/2023, 14:42:22
System Manufacturer:       LENOVO
System Model:              81SW
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 142 Stepping 12 GenuineIntel ~1792 Mhz
BIOS Version:              LENOVO BWCN19WW, 26/05/2021
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             it;Italian (Italy)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory:     12.134 MB
Available Physical Memory: 3.005 MB
Virtual Memory: Max Size:  18.534 MB
Virtual Memory: Available: 4.823 MB
Virtual Memory: In Use:    13.711 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\HELIUM
Hotfix(s):                 4 Hotfix(s) Installed.
                           [01]: KB5030651
                           [02]: KB5030310
                           [03]: KB5028756
                           [04]: KB5030508
Network Card(s):           1 NIC(s) Installed.
                           [01]: Intel(R) Wireless-AC 9560 160MHz
                                 Connection Name: Wi-Fi
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.1.1
                                 IP address(es)
                                 [01]: 192.168.1.52
                                 [02]: fe80::f8db:84e6:4e2f:2a26
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

I also have WSL installed:

> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.2361

also:

> cog --version
Cog 5.4.0

this is everything that comes to mind.

@sravioli sravioli changed the title [BUG] [BUG] Git not found when running post-bump hook Sep 27, 2023
@oknozor
Copy link
Collaborator

oknozor commented Sep 28, 2023

I think this could be fixed when #304 get merged

@sravioli
Copy link
Author

i updated to

$ cog --version
cog 5.6.0

and cog is working again:

$ cog bump --patch
  Skipping irrelevant commits:
    - hotfix: 1

[post-bump]
[git push]
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 8 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.66 KiB | 852.00 KiB/s, done.
Total 12 (delta 10), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (10/10), completed with 8 local objects.
To https://github.com/sRavioli/wezterm.git
   f98ffa5..96878b2  main -> main

[git push origin 2.0.4]
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/sRavioli/wezterm.git
 * [new tag]         2.0.4 -> 2.0.4

Bumped version: 2.0.3 -> 2.0.4

so I guess I'm closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants