{"id":20457645,"url":"https://github.com/readytalk/squirrel-server-go","last_synced_at":"2025-04-13T05:24:39.760Z","repository":{"id":27847697,"uuid":"31337954","full_name":"ReadyTalk/squirrel-server-go","owner":"ReadyTalk","description":"Squirrel Mac Server","archived":false,"fork":false,"pushed_at":"2016-11-19T03:50:10.000Z","size":11,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-26T22:11:10.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReadyTalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-25T22:00:08.000Z","updated_at":"2022-07-06T01:01:04.000Z","dependencies_parsed_at":"2022-09-03T13:31:20.778Z","dependency_job_id":null,"html_url":"https://github.com/ReadyTalk/squirrel-server-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReadyTalk%2Fsquirrel-server-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReadyTalk%2Fsquirrel-server-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReadyTalk%2Fsquirrel-server-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReadyTalk%2Fsquirrel-server-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReadyTalk","download_url":"https://codeload.github.com/ReadyTalk/squirrel-server-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248666973,"owners_count":21142352,"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":"2024-11-15T12:08:19.660Z","updated_at":"2025-04-13T05:24:39.712Z","avatar_url":"https://github.com/ReadyTalk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squirrel Mac Server\n\nThe purpose of this project is to provide the server-side requirements of the [Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac) auto-update system.  Note that this bears little-to-no relation to the [Squirrel.Windows](https://github.com/Squirrel/Squirrel.Windows) framework, which doesn't require an active server.\n\nSquirrel.Mac is intended to be integrated with an application.  It facilitates the process of checking for, downloading and installing updates.\n\n## Update Process\n\nThe flow goes something like this:\n\n* An application initializes Squirrel.Mac, gives it a url to hit to check for updates\n* Squirrel requests this url\n    * If it gets a \"204 No Content\" response, it assumes no update is required and reports as much to the application\n    * Any other response is parsed as JSON, and the \"url\" field is extracted\n* If an update is required, squirrel downloads the given URL, unzips it, and does various prepatatory steps\n* Squirrel notifies the application an update is available\n* The application presumably asks for user confirmation, then asks Squirrel to apply the update and then restart the application.\n\n## Existing Server\n\nThere is an existing [Squirrel.Server](https://github.com/Squirrel/Squirrel.Server), implemented in ruby.  It wasn't sufficient for our case for the following reasons:\n\n* It's inflexible, and only supports hosting updates for a single application\n* It would require us to modify our deployment strategy to include restarting the server\n\n## This Project\n\nThis server is dead simple.  It sends a 204 response as appropriate, but otherwise just proxies json files hosted elsewhere  It expects two parameters:\n\n* `url` - the json url to request\n* `version` (optional) - the version of the installed application\n\nThe server performs the following steps:\n\n* Requests the `url`\n* Parses the response as json (handling the various error cases)\n* Extracts the `version` field from the json response (which is actually ignored by Squrrel.Mac)\n* Compares that against the `version` query parameter\n    * If they match, send 204 No Content\n    * If not, send the data along\n\nThe server makes to attempt to do any caching, since load should be fairly low.\n\n## Running\n\n```\ndocker build -t squirrel-server-go .\ndocker run -d -p 3000:3000 squirrel-server-go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadytalk%2Fsquirrel-server-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freadytalk%2Fsquirrel-server-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadytalk%2Fsquirrel-server-go/lists"}