Last active
November 12, 2015 21:24
-
-
Save eheydrick/0d2239dd44373bf6b3e9 to your computer and use it in GitHub Desktop.
multi component apt repo publishing with aptly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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