{"action":"opened","issue":{"url":"https://api.github.com/repos/console-helpers/svn-buddy/issues/89","repository_url":"https://api.github.com/repos/console-helpers/svn-buddy","labels_url":"https://api.github.com/repos/console-helpers/svn-buddy/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/console-helpers/svn-buddy/issues/89/comments","events_url":"https://api.github.com/repos/console-helpers/svn-buddy/issues/89/events","html_url":"https://github.com/console-helpers/svn-buddy/issues/89","id":158491322,"number":89,"title":"Change version comparison to understand manually built phars","user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-04T06:48:27Z","updated_at":"2016-06-04T06:48:27Z","closed_at":null,"body":"Right now it's considered that there is new version available, when:\r\n\r\n* for snapshot/preview releases if PHAR's SHA is different from local PHAR's SHA\r\n* for stable releases if local phar version is smaller compared to latest stable version in GitHub\r\n\r\nThis doesn't work well for:\r\n\r\n* PHAR's built manually (not available as version)\r\n* PHAR's of non-stable releases\r\n\r\nbecause their version looks like `snapshot:v0.2.0-43-g181a34d`.\r\n\r\nTo solve this a new update strategy needs to be created that will:\r\n\r\n## For snapshot/preview releases\r\n\r\n1. strip namespace off the version (e.g. `snapshot:` or `preview:` or `stable:`)\r\n2. explode by `-` what's left\r\n3. compare versions and\r\n * if 2nd is larger then it's an update for sure\r\n * if 2nd is smaller then it's not an update for sure\r\n4. if both versions match compare number between `-` (the `43` in above example); if either of version don't have this number use 0 for comparison\r\n5. the version with larger number is considered to be an update\r\n\r\n## For stable releases\r\n\r\n1. provide main version part (the `v0.2.0` in above example) to the GitHubStrategy"}}
{"actor":{"display_login":"aik099"}}