-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Move go-licenses to generate and separate generate into a frontend and backend component #21061
Conversation
The go-licenses check introduced in go-gitea#21034 is being run on make vendor and occassionally causes an empty go-licenses file if the vendors need to change. This should be moved to the generate task as it is a generated file. Ref go-gitea#21034 Signed-off-by: Andrew Thornton <art27@cantab.net>
ah this will require a little more finesse... |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Make generate-swagger part of generate-frontend too Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
…t to backend Signed-off-by: Andrew Thornton <art27@cantab.net>
b17f481
to
fe0218e
Compare
Signed-off-by: Andrew Thornton <art27@cantab.net>
generate-swagger: $(SWAGGER_SPEC) | ||
|
||
$(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA) |
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.
Why not directly
generate-swagger: $(SWAGGER_SPEC) | |
$(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA) | |
generate-swagger: $(GO_SOURCES_NO_BINDATA) |
?
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.
Nope.
That won't do the right thing.
Try it
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.
Okay, I don't have to understand why, but I accept it.
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.
It's to do with the dependencies - the SWAGGER_SPEC line is creating a file that acts as evidence for the build job. If all sources are older than the SWAGGER_SPEC file it doesn't need to be generated
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: delvh <dev.lh@web.de>
make L-G-T-M work |
There's still an intermittent issue with the go-licenses make target that appears to drop the code.gitea.io license from time to time. @silverwind do you have any ideas what's happening here? |
Not sure I understand why these changes here were all necessary, but I'd probably just have dropped the |
Hmm, I could only imagine that the |
If automating this proves too difficult, we could also opt to make the target standalone without any dependants and just have it as a manual task after dependency update. |
* upstream/main: Fix sub folder in repository missing add file dropdown (go-gitea#21069) [skip ci] Updated translations via Crowdin Add missing volume to test-e2e (go-gitea#21079) Fix delete user missed some comments (go-gitea#21067) Remove insecure flag from curl (go-gitea#21074) Update curl usage in API docs (go-gitea#21071) Move go-licenses to generate and separate generate into a frontend and backend component (go-gitea#21061)
The
go-licenses
make task introduced in #21034 is being run on make vendorand occasionally causes an empty go-licenses file if the vendors need to
change. This should be moved to the generate task as it is a generated file.
Now because of this change we also need to split generation into two separate
steps:
generate-backend
generate-frontend
In the future it would probably be useful to make
generate-swagger
part ofgenerate-frontend
but it's not tolerated with our .drone.ymlRef #21034
Signed-off-by: Andrew Thornton art27@cantab.net