CopyQ
Variables
fosshub Namespace Reference

Variables

string project_id = '5c1195728c9fe8186f80a14b'
 
string fosshub_new_release_url = 'https://api.fosshub.com/rest/projects/{project_id}/releases/'.format(project_id=project_id)
 
string github_release_url = 'https://github.com/hluk/CopyQ/releases/download/v{version}/{basename}'
 
dictionary files
 
 version = sys.argv[1]
 
 api_key = sys.argv[2]
 
dictionary data
 
dictionary headers
 
 response = requests.post(fosshub_new_release_url, json=data, headers=headers)
 

Detailed Description

Create new release and upload files to FossHUB.

Get the API key from: https://devzone.fosshub.com/dashboard/profile

USAGE: ./fosshub.py <VERSION> <API_KEY>

Variable Documentation

◆ data

dictionary fosshub.data
Initial value:
1 = {
2  'version': version,
3  'files': [{
4  'fileUrl': github_release_url.format(version=version, basename=basename.format(version=version)),
5  'type': filetype,
6  'version': version
7  } for basename, filetype in files.items()],
8  'publish': True,
9 }

◆ files

dictionary fosshub.files
Initial value:
1 = {
2  'copyq-{version}-setup.exe': 'Windows Installer',
3  'copyq-{version}.zip': 'Windows Portable',
4  'CopyQ.dmg.zip': 'macOS',
5 }

◆ headers

dictionary fosshub.headers
Initial value:
1 = {
2  'X-Auth-Key': api_key
3 }