Commit Graph

15 Commits

Author SHA1 Message Date
Campbell Barton
6360edc867 Cleanup: quiet unused argument warning, line wrapping 2024-05-29 09:48:14 +10:00
Dalai Felinto
4b57951604 Extensions: New status message when checking for update
```
- Sync repo: {remote_url}
+ Checking repository "{remote_name}" for updates...

- Sync downloading remote data
+ Refreshing extensions list for "{remote_name}"...

- sync: invalid manifest ({error_msg}) reading {remote_url}!"
+ Repository error: invalid manifest ({error_msg}) for repository "{remote_name}"!

- Sync complete: {:s}".format(remote_url)
+ Extensions list for "{remote_name}" updated
```

---

Note, this is working as expected (from Blender anyways), however I can't test test_cli.py at the moment here.

---

Old messages:

<img src="https://projects.blender.org/attachments/9d4db8f5-ef9a-48c8-9e56-cb534aa9aed5" width=650>

New messages:

<img src="https://projects.blender.org/attachments/0245bcb7-6c4e-47e4-a616-0cf831761b47" width=450>

---

Co-authored by Pablo Vazquez

Pull Request: https://projects.blender.org/blender/blender/pulls/122378
2024-05-28 18:39:42 +02:00
Campbell Barton
b15bc1b5bb Extensions: add the blender version to the remote URL
Add query arguments to the URL when connecting to the remote server.

This information is stripped to create relative paths and for error
messages to prevent overly verbose URS's.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:41:43 +10:00
Campbell Barton
171319d9ef Extensions: send access token for HTTP requests
- The access token is used when connecting to the server.
- Mention an invalid access token as a possible cause for 403 errors.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:36:23 +10:00
Campbell Barton
91cab8f992 Extensions: remove use of BaseException
This can cause unexpected behavior, even in cases where SystemExit
or KeyboardInterrupt needs to be caught, it's better to list them
explicitly.
2024-05-24 16:16:55 +10:00
Campbell Barton
54cf0f7f4c Extensions: add support for "build" paths in the manifest
Add an optional `[build]` table, only used for the "build" sub-command.

Supported entries.

- `paths = [..]` list of strings.
  Explicitly list all paths to include.
  Python "wheels" and the manifest are automatically included.

- `paths_exclude_pattern = [..]` list of strings.
  A `.gitignore` compatible list of patterns.

By default "paths_exclude_pattern" is set to:
[".*", "__pycache__"] when the `[build]` table entry isn't found.

Only one of these options is supported at once since it makes to sense
to exclude paths when they're manually listed.
2024-05-22 15:02:12 +10:00
Campbell Barton
124f003fcb Cleanup: correct comments for package building
Also remove an unnecessary exclusion.
2024-05-22 12:35:17 +10:00
Campbell Barton
e0b47f78e8 Extensions: show permissions, validate permission values 2024-05-18 16:52:21 +10:00
Campbell Barton
2391407116 Cleanup: resolve mypy type warnings 2024-05-17 12:15:03 +10:00
Campbell Barton
676ac9cfb1 Cleanup: de-duplicate error handling when downloading extension data 2024-05-17 12:01:25 +10:00
Campbell Barton
05617ed07d Extensions: clarify defaults in extension command line help text
Also don't use `.` for the output-filepath because it's not a directory.
2024-05-17 10:32:20 +10:00
Campbell Barton
3003953e14 Extensions: rename the internal name for repository JSON
Use the name "index.json" instead of "bl_ext_repo.json".

This makes more sense as the name is automatically added to the end
of file:// URL's a little like index.html for web-sites.
2024-05-16 20:44:59 +10:00
Campbell Barton
30f4a5e051 Fix error checking for updates on startup
Manually deleting the extensions directory caused checking for
updates on startup to fail.

It attempted to create a directory without the parent existing
which raised an error.
2024-05-16 17:01:44 +10:00
Campbell Barton
672d203e67 Extensions: support file URI's for the remote URL
Previously regular paths were supported however supporting both
URL's and file paths isn't very common & complicated internal logic.

Also fixed an error where the server-generate sub-command created the
"archive_url" from the file-name without URL encoding.
2024-05-16 13:41:39 +10:00
Campbell Barton
13a3603578 Move addons from the addons repo to "addons_core"
Ref: !121825
2024-05-15 19:26:29 +02:00