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

Generated zips for matrix don't have a modified addon.xml #19

Open
michaelarnauts opened this issue Jan 13, 2021 · 2 comments · Fixed by #20
Open

Generated zips for matrix don't have a modified addon.xml #19

michaelarnauts opened this issue Jan 13, 2021 · 2 comments · Fixed by #20
Assignees

Comments

@michaelarnauts
Copy link
Contributor

It seems the zip that is generated when using -z doesn't have the modified addon.xml. I guess the issue might be in the util.create_zip method, since the uploaded PR is modified fine.

Example: https://github.com/enen92/screensaver.kaster/releases/tag/1.3.5
If you take a look at the matrix-zip, you'll notice that it doesn't contain the xbmc.python = 3.0.0 line.

@romanvm romanvm self-assigned this Jan 14, 2021
@michaelarnauts
Copy link
Contributor Author

The issue lies with the HEAD in this line: https://github.com/xbmc/kodi-addon-submitter/blob/master/addon_submitter/utils.py#L61. HEAD doesn't contain the changes that have been made to the addon.xml.

shell('git', 'archive', '-o', '{}.zip'.format(zip_name), 'HEAD', '--', addon_id)

We've worked around this by doing something like this in our Makefile. A git stash create gives a hash that can also be used with git archive and does contain the changes made to the addon.xml. When there are no changes in the current directory, a git stash create won't work, so HEAD is used as fallback there.

git archive --format zip --worktree-attributes -v -o ../$(zip_name) --prefix $(zip_dir) $(or $(shell git stash create), HEAD)

@michaelarnauts
Copy link
Contributor Author

michaelarnauts commented Mar 22, 2021

This had to be reverted.

This seems to have an issue when submitting the actual addon. I think that the git stash create causes the actual commit to fail. I'll probably have to git stash pop or find a better solution.

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 a pull request may close this issue.

3 participants