Skip to content

Commit 8c2d8e3

Browse files
Update update_setupcfg.yaml
1 parent 30e81e9 commit 8c2d8e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/update_setupcfg.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ jobs:
2626
# Extract values from codemeta.json
2727
NAME=$(jq -r '.name' codemeta.json)
2828
VERSION=$(jq -r '.version' codemeta.json)
29-
AUTHOR=$(jq -r '.author[] | .name' codemeta.json | paste -sd ", " -)
30-
AUTHOR_EMAIL=$(jq -r '.author[] | .email // "[email protected]"' codemeta.json | paste -sd ", " -)
29+
AUTHORS=$(jq -r '[.author[] | .givenName + " " + .familyName] | join(", ")' codemeta.json)
30+
AUTHOR_EMAILS=$(jq -r '[.author[] | .email // empty] | join(", ")' codemeta.json)
3131
DESCRIPTION=$(jq -r '.description' codemeta.json)
32-
URL=$(jq -r '.url' codemeta.json)
32+
URL=$(jq -r '.codeRepository // .url' codemeta.json)
3333
3434
# Update setup.cfg fields
3535
sed -i "s/^name = .*/name = $NAME/" setup.cfg
3636
sed -i "s/^version = .*/version = $VERSION/" setup.cfg
37-
sed -i "s/^author = .*/author = $AUTHOR/" setup.cfg
38-
sed -i "s/^author_email = .*/author_email = $AUTHOR_EMAIL/" setup.cfg
37+
sed -i "s/^author = .*/author = $AUTHORS/" setup.cfg
38+
sed -i "s/^author_email = .*/author_email = $AUTHOR_EMAILS/" setup.cfg
3939
sed -i "s/^description = .*/description = $DESCRIPTION/" setup.cfg
4040
sed -i "s|^url = .*|url = $URL|" setup.cfg
4141

0 commit comments

Comments
 (0)