snapshot_from_repo.sh 554 Bytes
Newer Older
1 2 3 4
#! /bin/bash

current_time=$(date "+%Y.%m.%d-%H.%M.%S")
repo_name="packages-"$current_time
5
package_dir="/opt/custom_packages/"
6 7
release_name="sugam"
release_version="2.1"
8
snapshot_name=$release_name-$release_version-inhouse-$current_time
9 10

# Create new repo with updates packages
11
aptly repo create $repo_name
12 13 14 15 16

aptly repo add  $repo_name $package_dir

aptly snapshot create $snapshot_name from repo $repo_name

17 18
# For now manually take care of merging the snaoshots and the publish, it may be
# fatal in case something happened incorrectly in this procedure