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

spksrc.publish.mk: add checks for empty variables #6065

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Apr 6, 2024

Description

This is another attempt to fix the publishing of packages by github action (broken by #6002)

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Includes small framework changes

- make setup-synocommunity triggers "make setup" and this fails when mk/spksrc.test-rules.mk is included
- add checks for empty PUBLISH_URL and PUBLISH_API_KEY in spksrc.publish.mk
- print PUBLISH_URL variable when publishing
@hgy59 hgy59 mentioned this pull request Apr 6, 2024
10 tasks
@th0ma7
Copy link
Contributor

th0ma7 commented Apr 6, 2024

I believe what's really needed is the following chage in spksrc.common.mk :

# Set basedir in case called from spkrc/ or from normal sub-dir
# Using github-action it actually is under /github/workspace
ifeq ($(BASEDIR),)
ifeq ($(filter spksrc workspace,$(shell basename $(CURDIR))),)
BASEDIR = ../../
endif
endif

I'll open-up a PR to test that assumption.

@hgy59
Copy link
Contributor Author

hgy59 commented Apr 6, 2024

@th0ma7 can you please have a look on the other issue fixed here:
When PUBLISH_URL or PUBLISH_API_KEY is not set, an error was only shown with make publish-all-* and not with make publish-arch-*.
The missing PUBLISH_URL is set to default when make setup-synocommunity was called (and fixed by you in #6066) but the missing PUBLISH_API_KEY error should be handled anyway.
This is also since #6002.

@hgy59
Copy link
Contributor Author

hgy59 commented Apr 6, 2024

@th0ma7 If you don't have a solution for PUBLISH_URL and PUBLISH_API_KEY, I will revert the changes in spksrc/Makefile and merge only my changes in mk/spksrc.publish.mk.

@th0ma7
Copy link
Contributor

th0ma7 commented Apr 6, 2024

@th0ma7 If you don't have a solution for PUBLISH_URL and PUBLISH_API_KEY, I will revert the changes in spksrc/Makefile and merge only my changes in mk/spksrc.publish.mk.

I can add something similar to yours, using the comment I just added. Give me a few minutes.

@hgy59 hgy59 changed the title intermediate fix for "make setup" spksrc.publish.mk: add checks for empty PUBLISH_URL and PUBLISH_API_KEY Apr 6, 2024
@hgy59 hgy59 changed the title spksrc.publish.mk: add checks for empty PUBLISH_URL and PUBLISH_API_KEY spksrc.publish.mk: add checks for empty variables Apr 6, 2024
@hgy59 hgy59 merged commit e6a4231 into SynoCommunity:master Apr 6, 2024
1 check passed
@hgy59 hgy59 deleted the fix_make_publish branch April 6, 2024 15:04
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 this pull request may close these issues.

2 participants