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

Fix broken hugo module on v2.79.0 #1838

Closed
wants to merge 4 commits into from

Conversation

wtchangdm
Copy link
Contributor

@wtchangdm wtchangdm commented Nov 8, 2024

This PR fixes #1835.

We could have used

- var dir = usersFolderPath + users[i].title.replaceAll("/", "-");
+ var dir = usersFolderPath + users[i].title.replaceAll("/", "-")
+                                            .replaceAll(".", "-")
+                                            .replaceAll("’", "-");

but there are too many symbols to handle.

Use url for paths should be unique enough.

@wtchangdm wtchangdm changed the base branch from main to dev November 9, 2024 10:45
@deining
Copy link
Contributor

deining commented Nov 10, 2024

This PR fixes #1835.

For me, it doesn't:

git clone [email protected]:wtchangdm/blowfish.git -b fix-hugo-module blowfish_wtchangdm
cd blowfish_wtchangdm/exampleSite
hugo mod init wtchangdm
go get github.com/wtchangdm/blowfish/v2@b943698178abe3b8eaa14020bc405219cd3d51b4
go: downloading github.com/wtchangdm/blowfish/v2 v2.79.100-0.20241108212210-b943698178ab
go: github.com/wtchangdm/blowfish/v2@b943698178abe3b8eaa14020bc405219cd3d51b4: create zip: exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md": invalid char ':'
exampleSite/content/users/Xeonzilla’s Note/feature.jpg: malformed file path "exampleSite/content/users/Xeonzilla’s Note/feature.jpg": invalid char '’'
exampleSite/content/users/Xeonzilla’s Note/index.it.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.it.md": invalid char '’'
exampleSite/content/users/Xeonzilla’s Note/index.ja.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.ja.md": invalid char '’'
exampleSite/content/users/Xeonzilla’s Note/index.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.md": invalid char '’'
exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md": invalid char '’'

Having a look at the log above, >I see that the error occurs while golang tries to build a zip-file from the repo. I think the only way to fix that issue is to remove the offending characters : and from the directory names.

@wtchangdm
Copy link
Contributor Author

For me, it doesn't:

I believe this is the script that @nunocoracao manually run before release. The change included in this branch is only the script itself: wtchangdm/blowfish@main...fix-hugo-module.

The effect you wanted to see (i.e., after running the script) is: wtchangdm/blowfish@main...after-script-run.

If you wanted to test the hugo module, you can change module.toml to:

[[imports]]
path = "github.com/wtchangdm/blowfish/v2"

and then this version in go.mod:

require github.com/wtchangdm/blowfish/v2 v2.79.9999999999 // indirect

@nunocoracao
Copy link
Owner

Closing, changing dir names to hashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use blowfish v2.79.0 as a hugo module
3 participants