{"action":"opened","issue":{"url":"https://api.github.com/repos/mina-deploy/mina/issues/328","labels_url":"https://api.github.com/repos/mina-deploy/mina/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/mina-deploy/mina/issues/328/comments","events_url":"https://api.github.com/repos/mina-deploy/mina/issues/328/events","html_url":"https://github.com/mina-deploy/mina/issues/328","id":93685504,"number":328,"title":"New setup project cannot deploy, \"Failed with status 1 (1)\"","user":{"login":"Cofyc","id":91730,"avatar_url":"https://avatars.githubusercontent.com/u/91730?v=3","gravatar_id":"","url":"https://api.github.com/users/Cofyc","html_url":"https://github.com/Cofyc","followers_url":"https://api.github.com/users/Cofyc/followers","following_url":"https://api.github.com/users/Cofyc/following{/other_user}","gists_url":"https://api.github.com/users/Cofyc/gists{/gist_id}","starred_url":"https://api.github.com/users/Cofyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cofyc/subscriptions","organizations_url":"https://api.github.com/users/Cofyc/orgs","repos_url":"https://api.github.com/users/Cofyc/repos","events_url":"https://api.github.com/users/Cofyc/events{/privacy}","received_events_url":"https://api.github.com/users/Cofyc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-08T03:49:52Z","updated_at":"2015-07-08T03:49:52Z","closed_at":null,"body":"I run `mina -S deploy` get deploy script, It contains:\r\n\r\n```bash\r\n#!/usr/bin/env bash\r\n\r\n# Bail out ASAP\r\nset -e\r\n\r\n....\r\n\r\n# Determine $previous_path and other variables\r\n[ -h \"current\" ] && [ -d \"current\" ] && previous_path=$(cd \"current\" >/dev/null && pwd -LP)\r\nbuild_path=\"./tmp/build-`date +%s`$RANDOM\"\r\nversion=$((`cat \"/var/www/project/last_version\" 2>/dev/null`+1))\r\nrelease_path=\"releases/$version\"\r\n...\r\n\r\n```\r\n\r\nWhen getting last version with cat, it failed and exit because of `last_version` file is missing.\r\n\r\n`mina setup` should create `last_version` file with 0, or deploy script check file exist or not.\r\n\r\nAt last, I create this file myself to work around this issue."}}