Skip to content

Commit

Permalink
Check on empty string generation
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Sep 18, 2023
1 parent ed0f5d6 commit 7940456
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publiccode-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
topics_str = ', '.join(topics_list)
# Update or append values
if "$REPO_NAME" != "null":
if "$REPO_NAME" != "null" and "$REPO_NAME":
data['name'] = "$REPO_NAME"
if "$REPO_URL" != "null":
if "$REPO_URL" != "null" and "$REPO_URL":
data['url'] = "$REPO_URL"
if "$REPO_DESC" != "null":
if "$REPO_DESC" != "null" and "$REPO_DESC":
data['description'] = "$REPO_DESC"
if "$REPO_HOMEPAGE" != "null":
data['homepage'] = "$REPO_HOMEPAGE"
if "$REPO_HOMEPAGE" != "null" and "$REPO_HOMEPAGE":
data['url'] = "$REPO_HOMEPAGE"
if topics_str:
data['topics'] = topics_str
if "$REPO_LICENSE" != "null":
if "$REPO_LICENSE" != "null" and "$REPO_LICENSE":
data['license'] = "$REPO_LICENSE"
# Add releaseDate if not present
Expand All @@ -86,13 +86,13 @@ jobs:
# Create or update nested 'organisation' array
if 'organisation' not in data:
data['organisation'] = {}
if "$ORGANISATION_NAME" != "null":
if "$ORGANISATION_NAME" != "null" and "$ORGANISATION_NAME":
data['organisation']['name'] = "$ORGANISATION_NAME"
if "$ORGANISATION_AVATAR" != "null":
if "$ORGANISATION_AVATAR" != "null" and "$ORGANISATION_AVATAR":
data['organisation']['avatar'] = "$ORGANISATION_AVATAR"
if "$ORGANISATION_URL" != "null":
if "$ORGANISATION_URL" != "null" and "$ORGANISATION_URL":
data['organisation']['url'] = "$ORGANISATION_URL"
if "$ORGANISATION_DESCRIPTION" != "null":
if "$ORGANISATION_DESCRIPTION" != "null" and "$ORGANISATION_DESCRIPTION":
data['organisation']['description'] = "$ORGANISATION_DESCRIPTION"
# Write updated publiccode.yaml
Expand Down
11 changes: 0 additions & 11 deletions publiccode.yaml

This file was deleted.

0 comments on commit 7940456

Please sign in to comment.