Skip to content

Instantly share code, notes, and snippets.

@eheydrick
Last active November 12, 2015 21:24
Show Gist options
  • Save eheydrick/0d2239dd44373bf6b3e9 to your computer and use it in GitHub Desktop.
Save eheydrick/0d2239dd44373bf6b3e9 to your computer and use it in GitHub Desktop.
multi component apt repo publishing with aptly
#!/bin/bash
#
# multi-component apt repo publishing with aptly - http://www.aptly.info/
# Usage:
# ./multi-component-repo.sh <component>
# where component is the component to put the package in
#
# See http://www.aptly.info/doc/feature/multi-component/ for more info
#
all_components=(main testing)
component=$1
# create a repo per component
for component in "${all_components[@]}"; do
aptly repo create -component=${component} my-${component};
done
# add the package to the repo
aptly repo add my-${component} my-package.deb
# publish the repo to S3
aptly publish repo -gpg-key=mykey -distribution="mydistro" -architectures="i386,amd64,all" -component=, my-testing my-main s3:repo:
aptly publish update -gpg-key=mykey -force-overwrite=true mydistro s3:repo:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment