Browse Source

build: only adds the correct packages to the repo.

Leonard Gram 7 years ago
parent
commit
919617ef96

+ 4 - 3
scripts/build/update_repo/update-deb.sh

@@ -14,14 +14,15 @@ set -e
 cp scripts/build/update_repo/aptly.conf /etc/aptly.conf
 cp scripts/build/update_repo/aptly.conf /etc/aptly.conf
 mkdir -p /deb-repo/db
 mkdir -p /deb-repo/db
 mkdir -p /deb-repo/repo
 mkdir -p /deb-repo/repo
+mkdir -p /deb-repo/tmp
 
 
 # Download the database
 # Download the database
 gsutil -m rsync -r gs://grafana-aptly-db/repo-db /deb-repo/db
 gsutil -m rsync -r gs://grafana-aptly-db/repo-db /deb-repo/db
 
 
 # Add the new release to the repo
 # Add the new release to the repo
-set +e
-aptly publish drop squeeze filesystem:repo:grafana
-set -e
+aptly publish drop squeeze filesystem:repo:grafana || true
+cp ./dist/*.deb /deb-repo/tmp
+rm /deb-repo/tmp/grafana_latest*.deb || true
 aptly repo add grafana ./dist
 aptly repo add grafana ./dist
 
 
 # Setup signing and sign the repo
 # Setup signing and sign the repo

+ 1 - 0
scripts/build/update_repo/update-rpm.sh

@@ -18,6 +18,7 @@ gsutil -m rsync -r "gs://grafana-repo/$RELEASE_TYPE/rpm" /rpm-repo
 
 
 # Add the new release to the repo
 # Add the new release to the repo
 cp ./dist/*.rpm /rpm-repo
 cp ./dist/*.rpm /rpm-repo
+rm /rpm-repo/grafana-latest-1*.rpm || true
 cd /rpm-repo
 cd /rpm-repo
 createrepo .
 createrepo .