Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
Ingvord edited this page Feb 27, 2018 · 10 revisions

How to build a package and upload it to bintray

Build everything

$> cd cmake-build-debug && make clean && make

Increment version

  1. in main CMakeLists.txt replace minor or patch version
  2. commit to git
  3. create git tag: $> git tag 9.2.7

Prepare package

  1. $> cpack

The good output looks like this:

CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: Project
CPack: - Install project: Project
CPack: Create package
CPack: - package: /storage/Projects/org.tango/git/cppTango/cmake-build-debug/Project-0.1.1-Linux.deb generated.
  1. Rename resulting package file if necessary:
$> mv Project-0.1.1-Linux.deb libtango_9.2.7_amd64.deb

Upload to bintray:

$> curl -v -T libtango_9.2.7_amd64.deb -u<USER_NAME>:<BINTRAY_API_KEY> "https://api.bintray.com/content/tango-controls/debian/cppTango/9.2.7/pool/libtango_9.2.7_amd64.deb;deb_distribution=jessie;deb_component=development;deb_architecture=amd64;publish=1"

NOTE: surround url with "

The good output is:

...
* Connection #0 to host api.bintray.com left intact
{"message":"success"}

The above example is for libtango version 9.2.7 debian distribution jessie, component development, architecture amd64, replace accordingly. Basically you can follow bintray's guide for uploading debian packages: https://bintray.com/docs/usermanual/formats/formats_debianrepositories.html

Check that package has been uploaded

  1. make sure to add bintray debian repo to your /etc/apt/sources.list.d e.g.:
$> cat /etc/apt/sources.list.d/tango-controls.list 
deb https://dl.bintray.com/tango-controls/debian jessie development
  1. update apt repo: sudo apt-get update

  2. list libtango versions: $> aptitude versions libtango

Package libtango-dev:                    
p   9.2.5                                                                                                jessie                                                                           500 
p   9.2.7                                                                                                jessie                                                                           500 

Push git tag

Once package has been uploaded push git tag to origin: $> git push --tags