{"id":27945168,"url":"https://github.com/voideditor/void-updates-server","last_synced_at":"2025-05-07T12:56:15.759Z","repository":{"id":274760250,"uuid":"923949060","full_name":"voideditor/void-updates-server","owner":"voideditor","description":"Endpoint Void uses to check for updates.","archived":false,"fork":false,"pushed_at":"2025-04-16T19:09:52.000Z","size":147,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T12:56:02.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://updates.voideditor.dev","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voideditor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T05:55:59.000Z","updated_at":"2025-04-16T19:09:59.000Z","dependencies_parsed_at":"2025-03-22T21:41:03.216Z","dependency_job_id":null,"html_url":"https://github.com/voideditor/void-updates-server","commit_stats":null,"previous_names":["voideditor/void-updates-server"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voideditor%2Fvoid-updates-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voideditor%2Fvoid-updates-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voideditor%2Fvoid-updates-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voideditor%2Fvoid-updates-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voideditor","download_url":"https://codeload.github.com/voideditor/void-updates-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883221,"owners_count":21819157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T12:56:15.238Z","updated_at":"2025-05-07T12:56:15.742Z","avatar_url":"https://github.com/voideditor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nThis is an endpoint that Void pings to check for updates and get a downloadURL. Super simple, entry point is here: https://github.com/voideditor/void-updates-server/blob/main/app/%5B...route%5D/route.ts\n\nEventually we should get rid of this in favor of void-builder.\n\n## Overview\n\nWhenever we want to create a new release of Void, we run `./mac.sh`. This generates a folder called VoidSign-arm64 with these contents:\n1. `Void.app` (inside a `.zip` file)\n2. `hash.json`\n3. `Void.dmg`\n\n- `Void.app` is the raw file that actually runs Void. Updates work by simply swapping in a new version of this.\n- `hash.json` are hashes to make sure `Void.app` was not corrupted on download. \n- `Void.dmg` is the installer for Void. Just a wrapper around `Void.app`, not used in updating.\n\n\n\n## Updating Flow\n\nHere's how updating is intended to work. Reference [`abstractUpdateService.ts`](https://github.com/voideditor/void/blob/c1123f2cfd570e744e0e867f5f53d0c108c32c97/src/vs/platform/update/electron-main/abstractUpdateService.ts#L18).\n\nFirst, Void pings the update server (this repo) which lives on `https://updates.voideditor.dev/api/update/\u003cproduct\u003e/stable/\u003ccommit\u003e`. (product is something like darwin-arm64, and commit is the commit hash, e.g. abcdefg123).\n\nHere's what happens next:\n\n```\nVoid on Desktop                                update server\n                -----check for update------\u003e\n                                                  - compare latest commit hash with user's commit hash\n                                                  - if not equal, respond with a JSON\nJSON            \u003c---------respond----------\n```\n\nthe returned JSON is of type: \n```ts\n{\n\t\n\t\"url\": \"https://github.com/voideditor/void/releases/v1.0.0/Void-RawApp-darwin-arm64.zip\",  // where to go to get the `Void.app` `.zip` file\n\t\n\t// ---------- this is from the latest hash.json to validate the above url ----------\n\t\"sha256hash\": \"7bfd6874c1608149d9cecaab51e5cd5fca715ca0f7c3d34918017f0cbdadd81b\", // sha256 hash\n\t\"hash\": \"033bd94b1168d7e4f0d644c3c95e35bf1ce6bfab\", // sha1 hash\n\t\"timestamp\": 1241241411738132963, // unix timestamp  (not really important)\n\t\"version\": \"abcdefg123\", // latest commit hash \n\t// ---------------------------------------------------------------------------------\n\n\t// this doesn't really matter\n\t\"productVersion\": \"1.9.4\",\n\n}\n```\n\n\nRight now, running everything described above, we get an error like \"signature could not be verified\" once `Void.app.zip` is downloaded. It's not clear if this is a hash signature issue, a mac codesigning issue, or something else.\n\nSo we're not using the built-in auto-updater right now, and instead we're prompting the user to update manually (not ideal).\n\n\n## Todos\n\n- We might want to turn Void into a monorepo so we can share version number and commit across the update server, website, and desktop app.\n\n\n## New release of Void\n\nTo do a new Void release (should only be done by maintainers):\n\n1. Run ./mac.sh on Mac, ./windows.sh on windows, and _ on linux (still being added).\n2. Upload all files to the GitHub release (for now, typically we don't change the tag).\n3. Update commit number and version number on the `void-updates-server` after all releases have been uploaded, to start informing users of an update.\n4. If we changed the GitHub release tag, make sure to change the download URLs on `void-website` too.\n5. Update the changelog on `void-website`.\n\n\n## GitHub release version number\n\n- For now, we're just sticking with a GitHub release the major version number so we don't have to make a lot of changes every time we update. For example, GitHub releases will be on v1.0.0 even if we're on 1.0.1, 1.1.0, etc. \n- We're not moving the v1.0.0 tag to the newer commit during releases, because we want the next tag to auto-populate all the changes since the last tag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoideditor%2Fvoid-updates-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoideditor%2Fvoid-updates-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoideditor%2Fvoid-updates-server/lists"}