Makefile: Add a standalone recipe for building only the addon .zip #104239

Merged
Sybren A. Stüvel merged 1 commits from ZedDB/flamenco:plugin into main 2023-08-23 15:21:16 +02:00

This option makes it easier to only build and distribute the addon.
Before this change, the only way to generate the addon .zip via make was to also build the manager.

This option makes it easier to only build and distribute the addon. Before this change, the only way to generate the addon .zip via `make` was to also build the manager.
Sebastian Parborg added 1 commit 2023-07-27 15:05:18 +02:00
Sybren A. Stüvel requested changes 2023-07-27 16:33:00 +02:00
Sybren A. Stüvel left a comment
Owner

LGTM, just one small nag

LGTM, just one small nag
Makefile Outdated
@ -75,1 +75,4 @@
.PHONY: flamenco-addon
flamenco-addon: addon-packer
./addon-packer -filename ./flamenco3-addon.zip

Since this produces a file called flamenco3-addon.zip, I think it's better to also name the receipe flamenco3-addon.zip.

Since this produces a file called `flamenco3-addon.zip`, I think it's better to also name the receipe `flamenco3-addon.zip`.

Maybe a bit off-topic, but I would suggest to drop the "3" from Flamenco moving forward. Enough time has passed since the new release, and it should be distributed just as Flamenco.

Maybe a bit off-topic, but I would suggest to drop the "3" from Flamenco moving forward. Enough time has passed since the new release, and it should be distributed just as Flamenco.
Author
Member

I agree as well to just drop "3". From grepping the code in the repo, it doesn't seem to be too hard to do:

web/app/src/components/GetTheAddon.vue
5:      <p><a class="btn btn-primary" :href="backendURL('/flamenco3-addon.zip')">Get the add-on!</a></p>

web/app/src/App.vue
19:      <a :href="backendURL('/flamenco3-addon.zip')">add-on</a>

addon/flamenco/gui.py
112:            op = row.operator("flamenco3.explore_file_path", text="", icon="WINDOW")

addon/flamenco/operators.py
629:class FLAMENCO3_OT_explore_file_path(bpy.types.Operator):
635:    bl_idname = "flamenco3.explore_file_path"
684:    FLAMENCO3_OT_explore_file_path,

Makefile
99:	./addon-packer -filename ${WEB_STATIC}/flamenco3-addon.zip

cmd/addon-packer/addon-packer.go
150:	flag.StringVar(&cliArgs.filename, "filename", "web/static/flamenco3-addon.zip", "Filename to save the add-on to.")

deploy.sh
4:ADDON_ZIP="$MY_DIR/web/static/flamenco3-addon.zip"
5:WORKER_TARGET=/shared/software/flamenco3-worker/flamenco-worker
23:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t sudo systemctl stop flamenco3-manager
24:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t cp /home/flamenco3/flamenco-manager.sqlite /home/flamenco3/flamenco-manager.sqlite-bak-$TIMESTAMP
25:scp flamenco-manager flamenco.farm.blender:/home/flamenco3/
26:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t sudo systemctl start flamenco3-manager

cmd/flamenco-manager/webservice.go
139:	e.GET("/flamenco3-addon.zip", echo.WrapHandler(webAppHandler))
I agree as well to just drop "3". From grepping the code in the repo, it doesn't seem to be too hard to do: ``` web/app/src/components/GetTheAddon.vue 5: <p><a class="btn btn-primary" :href="backendURL('/flamenco3-addon.zip')">Get the add-on!</a></p> web/app/src/App.vue 19: <a :href="backendURL('/flamenco3-addon.zip')">add-on</a> addon/flamenco/gui.py 112: op = row.operator("flamenco3.explore_file_path", text="", icon="WINDOW") addon/flamenco/operators.py 629:class FLAMENCO3_OT_explore_file_path(bpy.types.Operator): 635: bl_idname = "flamenco3.explore_file_path" 684: FLAMENCO3_OT_explore_file_path, Makefile 99: ./addon-packer -filename ${WEB_STATIC}/flamenco3-addon.zip cmd/addon-packer/addon-packer.go 150: flag.StringVar(&cliArgs.filename, "filename", "web/static/flamenco3-addon.zip", "Filename to save the add-on to.") deploy.sh 4:ADDON_ZIP="$MY_DIR/web/static/flamenco3-addon.zip" 5:WORKER_TARGET=/shared/software/flamenco3-worker/flamenco-worker 23:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t sudo systemctl stop flamenco3-manager 24:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t cp /home/flamenco3/flamenco-manager.sqlite /home/flamenco3/flamenco-manager.sqlite-bak-$TIMESTAMP 25:scp flamenco-manager flamenco.farm.blender:/home/flamenco3/ 26:ssh -o ClearAllForwardings=yes flamenco.farm.blender -t sudo systemctl start flamenco3-manager cmd/flamenco-manager/webservice.go 139: e.GET("/flamenco3-addon.zip", echo.WrapHandler(webAppHandler)) ```

Maybe a bit off-topic, but I would suggest to drop the "3" from Flamenco moving forward. Enough time has passed since the new release, and it should be distributed just as Flamenco.

We could, but that's for a different PR, then. For this PR I still feel that the Make rule should match the filename that's being produced by it.

> Maybe a bit off-topic, but I would suggest to drop the "3" from Flamenco moving forward. Enough time has passed since the new release, and it should be distributed just as Flamenco. We could, but that's for a different PR, then. For this PR I still feel that the Make rule should match the filename that's being produced by it.
Sebastian Parborg force-pushed plugin from 5c8b43a3eb to 7fa43c836e 2023-07-28 16:44:56 +02:00 Compare
Author
Member

Updated the make rule to produce a zip file with the same name as the rule.
As this in a new recipe and doesn't touch any of the existing code, I think this is for the better.
But it might not be what you meant?

Updated the make rule to produce a zip file with the same name as the rule. As this in a new recipe and doesn't touch any of the existing code, I think this is for the better. But it might not be what you meant?

Updated the make rule to produce a zip file with the same name as the rule.

I think this gets super confusing, when there's multiple ways in which the add-on is packed. It's the opposite of what I meant: the rule should match the filename, and not the other way around.

To simplify the discussion, I've just committed 100e8e404e to rename the add-on to flamenco-addon.zip.

> Updated the make rule to produce a zip file with the same name as the rule. I think this gets super confusing, when there's multiple ways in which the add-on is packed. It's the opposite of what I meant: the rule should match the filename, and not the other way around. To simplify the discussion, I've just committed 100e8e404e3783ac6ec408763273b453e0ea2ea8 to rename the add-on to `flamenco-addon.zip`.
Sybren A. Stüvel requested changes 2023-08-01 13:09:47 +02:00
Sybren A. Stüvel left a comment
Owner

The rule still doesn't match the filename. The rule is flamenco-addon, the filename is flamenco-addon.zip.

The rule still doesn't match the filename. The rule is `flamenco-addon`, the filename is `flamenco-addon.zip`.
Sebastian Parborg force-pushed plugin from 7fa43c836e to d6abf0c5e0 2023-08-01 14:06:03 +02:00 Compare
Author
Member

Updated the make file so the rule is named flamenco-addon.zip.
Because the filename now matches, I removed "phony" as it now conforms to regular makefile rules.

Updated the make file so the rule is named `flamenco-addon.zip`. Because the filename now matches, I removed "phony" as it now conforms to regular makefile rules.
Sybren A. Stüvel approved these changes 2023-08-23 15:20:36 +02:00
Sybren A. Stüvel left a comment
Owner

👍

:+1:
Sybren A. Stüvel merged commit 5f3c8c259d into main 2023-08-23 15:21:16 +02:00
Sign in to join this conversation.
No description provided.