Skip to content

Commit

Permalink
Only set prerelease once (#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Aug 13, 2024
1 parent cf25082 commit 60a80d3
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 6 deletions.
3 changes: 2 additions & 1 deletion scripts/data/generate_category_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ async def concurrent_update_repository(self, repository: HacsRepository) -> None
elif release.prerelease:
repository.logger.info(
"%s Found prerelease %s", repository.string, release.tag_name)
repository.data.prerelease = release.tag_name
if repository.data.prerelease is None:
repository.data.prerelease = release.tag_name

else:
repository.logger.info(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/3",
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/4",
"html_url": "https://github.com/hacs-test-org/integration-basic/releases/3.0.0",
"assets_url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/3/assets",
"upload_url": "https://uploads.github.com/repos/hacs-test-org/integration-basic/releases/3/assets{?name,label}",
"assets_url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/4/assets",
"upload_url": "https://uploads.github.com/repos/hacs-test-org/integration-basic/releases/4/assets{?name,label}",
"tarball_url": "https://api.github.com/repos/hacs-test-org/integration-basic/tarball/3.0.0",
"zipball_url": "https://api.github.com/repos/hacs-test-org/integration-basic/zipball/3.0.0",
"id": 3,
"id": 4,
"node_id": "MDc6UmVsZWFzZTE=",
"tag_name": "3.0.0",
"target_commitish": "master",
Expand Down Expand Up @@ -38,7 +38,7 @@
},
"assets": [
{
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/assets/3",
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/assets/4",
"browser_download_url": "https://github.com/hacs-test-org/integration-basic/releases/download/3.0.0/example.zip",
"id": 1,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
Expand Down Expand Up @@ -73,6 +73,80 @@
}
]
},
{
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/3",
"html_url": "https://github.com/hacs-test-org/integration-basic/releases/2.5.0",
"assets_url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/3/assets",
"upload_url": "https://uploads.github.com/repos/hacs-test-org/integration-basic/releases/3/assets{?name,label}",
"tarball_url": "https://api.github.com/repos/hacs-test-org/integration-basic/tarball/2.5.0",
"zipball_url": "https://api.github.com/repos/hacs-test-org/integration-basic/zipball/2.5.0",
"id": 3,
"node_id": "MDc6UmVsZWFzZTE=",
"tag_name": "2.5.0",
"target_commitish": "master",
"name": "2.5.0",
"body": "Description of the release",
"draft": false,
"prerelease": true,
"created_at": "2013-02-27T19:35:32Z",
"published_at": "2013-02-27T19:35:32Z",
"author": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/hacs-test-org/followers",
"following_url": "https://api.github.com/users/hacs-test-org/following{/other_user}",
"gists_url": "https://api.github.com/users/hacs-test-org/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hacs-test-org/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hacs-test-org/subscriptions",
"organizations_url": "https://api.github.com/users/hacs-test-org/orgs",
"repos_url": "https://api.github.com/users/hacs-test-org/repos",
"events_url": "https://api.github.com/users/hacs-test-org/events{/privacy}",
"received_events_url": "https://api.github.com/users/hacs-test-org/received_events",
"type": "User",
"site_admin": false
},
"assets": [
{
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/assets/3",
"browser_download_url": "https://github.com/hacs-test-org/integration-basic/releases/download/2.5.0/example.zip",
"id": 1,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
"name": "example.zip",
"label": "short description",
"state": "uploaded",
"content_type": "application/zip",
"size": 321024,
"download_count": 32425,
"created_at": "2013-02-27T19:35:32Z",
"updated_at": "2013-02-27T19:35:32Z",
"uploader": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/hacs-test-org/followers",
"following_url": "https://api.github.com/users/hacs-test-org/following{/other_user}",
"gists_url": "https://api.github.com/users/hacs-test-org/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hacs-test-org/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hacs-test-org/subscriptions",
"organizations_url": "https://api.github.com/users/hacs-test-org/orgs",
"repos_url": "https://api.github.com/users/hacs-test-org/repos",
"events_url": "https://api.github.com/users/hacs-test-org/events{/privacy}",
"received_events_url": "https://api.github.com/users/hacs-test-org/received_events",
"type": "User",
"site_admin": false
}
}
]
},
{
"url": "https://api.github.com/repos/hacs-test-org/integration-basic/releases/2",
"html_url": "https://github.com/hacs-test-org/integration-basic/releases/2.0.0",
Expand Down

0 comments on commit 60a80d3

Please sign in to comment.