Updated to add git release script
This commit is contained in:
		| @@ -4,7 +4,7 @@ | |||||||
|         "version": "PTDL_v1", |         "version": "PTDL_v1", | ||||||
|         "update_url": null |         "update_url": null | ||||||
|     }, |     }, | ||||||
|     "exported_at": "2022-03-31T08:25:53+01:00", |     "exported_at": "2022-03-31T11:32:42+01:00", | ||||||
|     "name": "owncast.online", |     "name": "owncast.online", | ||||||
|     "author": "psychoalex@thevcbc.com", |     "author": "psychoalex@thevcbc.com", | ||||||
|     "description": "Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.", |     "description": "Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.", | ||||||
| @@ -22,7 +22,7 @@ | |||||||
|     }, |     }, | ||||||
|     "scripts": { |     "scripts": { | ||||||
|         "installation": { |         "installation": { | ||||||
|             "script": "#!\/bin\/bash\r\n\r\n#Make Server Dir\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n    mkdir \/mnt\/server\/\r\nfi\r\ncd \/mnt\/server\/\r\n\r\n#Get Dependencies\r\napt-get -y update\r\napt-get -y install curl unzip tar\r\n\r\n#Get Owncast Install Files\r\ncurl -L https:\/\/github.com\/owncast\/owncast\/releases\/download\/v${OWNCAST_VERSION}\/owncast-${OWNCAST_VERSION}-linux-64bit.zip --output .\/owncast_installer.zip\r\n\r\n#Unzip Install Files\r\nunzip -o -q .\/owncast_installer.zip\r\nrm .\/owncast_installer.zip", |             "script": "#!\/bin\/bash\r\n\r\n#Make Server Dir\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n    mkdir \/mnt\/server\/\r\nfi\r\ncd \/mnt\/server\/\r\n\r\n#Get Dependencies\r\napt-get -y update\r\napt-get -y install curl unzip tar jq\r\n\r\n#Get Owncast Install Files\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n    echo -e \"using anon api call\"\r\nelse\r\n    echo -e \"user and oauth token set\"\r\n    alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n    DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n    VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n    if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n        DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n    else\r\n        echo -e \"defaulting to latest release\"\r\n        DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n    fi\r\nfi\r\n\r\necho Download URL is: ${DOWNLOAD_URL}\r\n\r\ncurl -L ${DOWNLOAD_URL} --output .\/owncast_installer.zip\r\n\r\n#curl -L https:\/\/github.com\/owncast\/owncast\/releases\/download\/v${OWNCAST_VERSION}\/owncast-${OWNCAST_VERSION}-linux-64bit.zip --output .\/owncast_installer.zip\r\n\r\n#Unzip Install Files\r\nunzip -o -q .\/owncast_installer.zip\r\nrm .\/owncast_installer.zip", | ||||||
|             "container": "debian:buster-slim", |             "container": "debian:buster-slim", | ||||||
|             "entrypoint": "bash" |             "entrypoint": "bash" | ||||||
|         } |         } | ||||||
| @@ -48,12 +48,48 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "Owncast Version", |             "name": "Owncast Version", | ||||||
|             "description": "The version of Owncast that you would like to install, from https:\/\/github.com\/owncast\/owncast\/releases", |             "description": "The version of Owncast that you would like to install, from https:\/\/github.com\/owncast\/owncast\/releases\r\nAs an Example - \"v0.0.11\" for a specific version or \"latest\" for the most up to date version.", | ||||||
|             "env_variable": "OWNCAST_VERSION", |             "env_variable": "VERSION", | ||||||
|             "default_value": "0.0.11", |             "default_value": "latest", | ||||||
|             "user_viewable": true, |             "user_viewable": true, | ||||||
|             "user_editable": true, |             "user_editable": true, | ||||||
|             "rules": "required|string|max:20" |             "rules": "required|string|max:20" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Github Repository", | ||||||
|  |             "description": "Used to identify the github repository to pull the release from.", | ||||||
|  |             "env_variable": "GITHUB_PACKAGE", | ||||||
|  |             "default_value": "owncast\/owncast", | ||||||
|  |             "user_viewable": false, | ||||||
|  |             "user_editable": false, | ||||||
|  |             "rules": "required|string|max:120" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Github File Match", | ||||||
|  |             "description": "Used to identify the specific asset under a release for download.", | ||||||
|  |             "env_variable": "MATCH", | ||||||
|  |             "default_value": "linux-64bit", | ||||||
|  |             "user_viewable": false, | ||||||
|  |             "user_editable": false, | ||||||
|  |             "rules": "required|string|max:20" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Github User", | ||||||
|  |             "description": "Required if you are doing more calls than the github anonymous API user allows.", | ||||||
|  |             "env_variable": "GITHUB_USER", | ||||||
|  |             "default_value": "", | ||||||
|  |             "user_viewable": false, | ||||||
|  |             "user_editable": false, | ||||||
|  |             "rules": "nullable|string|max:20" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "name": "Github Oauth Token", | ||||||
|  |             "description": "Required if you are doing more calls than the github anonymous API user allows.", | ||||||
|  |             "env_variable": "GITHUB_OAUTH_TOKEN", | ||||||
|  |             "default_value": "", | ||||||
|  |             "user_viewable": false, | ||||||
|  |             "user_editable": false, | ||||||
|  |             "rules": "nullable|string|max:128" | ||||||
|         } |         } | ||||||
|     ] |     ] | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user