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

Go: Completely rewrite #369

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Go: Completely rewrite #369

wants to merge 14 commits into from

Conversation

micahflee
Copy link

The existing Flatpak Go Get Generator no longer works with the modern Go ecosystem. The flatpak-go-get-generator.py script works by looking for git repos in the Flatpak build dir after running go get, but that doesn't even create git repos anymore.

So this PR deletes the old go-get folder and makes a new go folder. This requires that Go and git are installed on the local system.

This script works by creating a new Go module in a temporary folder, add the given Go package as a dependency, and then runs go list -m all to get the full list of Go modules. For each module, it uses go list -m -json <module> to get detailed information. And then finally, it outputs the module in YAML format.

go/README.md Outdated
- dest: src/git/torproject/org/pluggable-transports/goptlib/git
tag: v1.1.0
type: git
url: https://git.torproject.org/pluggable-transports/goptlib.git.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall the commit also be added to protect against retagging?


os.chdir(temp_dir)

if folder:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this if is a mistake. When given a root dir such as github.com/a/b.git/, this script detects no dependencies because it never switches into the repo directory. When I comment this line, it works.

Also it'd be nice if we could just give it the git url without the slash

@hfiguiere hfiguiere added the go Go lang label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Go lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants