Skip to main content

Electron Builder

Returns the YAML content required for electron-builder updates and generates *.yml feed metadata.

Response Format​

  • YAML configuration files (latest.yml, latest-mac.yml, latest-linux.yml).
  • Compatible with the electron-builder / electron-updater update mechanism.

Generated Files​

Generated FilePurpose
*.ymlContains package information and update metadata for electron-builder

Checking for Updates​

curl -X GET 'http://localhost:9000/checkVersion?app_name=myapp&version=1.0.0&channel=stable&platform=windows&arch=amd64&owner=admin&updater=electron-builder'

Upload with the updater Parameter​

Include the updater parameter so the binary and *.yml land in an isolated folder:

curl -X POST --location 'http://localhost:9000/upload' \
--header 'Authorization: Bearer <jwt_token>' \
--form 'file=@"/path_to_file/myapp.exe"' \
--form 'file=@"/path_to_file/latest.yml"' \
--form 'data="{\"app_name\":\"myapp\",\"version\":\"0.0.1\",\"channel\":\"stable\",\"publish\":true,\"platform\":\"windows\",\"arch\":\"amd64\",\"updater\":\"electron-builder\"}"'

For macOS, upload the whole build output of one architecture in one request — latest-mac.yml, the .zip, the .dmg and both .blockmap files:

curl -X POST --location 'http://localhost:9000/upload' \
--header 'Authorization: Bearer <jwt_token>' \
--form 'file=@"/path_to_file/latest-mac.yml"' \
--form 'file=@"/path_to_file/myapp-0.0.1-arm64-mac.zip"' \
--form 'file=@"/path_to_file/myapp-0.0.1-arm64-mac.zip.blockmap"' \
--form 'file=@"/path_to_file/myapp-0.0.1-arm64.dmg"' \
--form 'file=@"/path_to_file/myapp-0.0.1-arm64.dmg.blockmap"' \
--form 'data="{\"app_name\":\"myapp\",\"version\":\"0.0.1\",\"channel\":\"stable\",\"publish\":true,\"platform\":\"darwin\",\"arch\":\"arm64\",\"updater\":\"electron-builder\"}"'

electron-updater updates macOS apps from the .zip and uses .zip.blockmap for differential downloads; the .dmg is for first installs from your download page (see /apps/latest). The .dmg.blockmap is not used, but uploading it is harmless — several .blockmap files per platform and architecture are accepted.

Files are then organized as:

/updater/myapp/stable/windows/amd64/0.0.1/
├── myapp.exe
└── latest.yml