echo "deb [trusted=yes] https://starkandwayne-debian-apt.s3.amazonaws.com stable main" > /etc/apt/sources.list.d/starkandwayne.list
apt-get update
apt-get install genesis
Last active
July 30, 2017 01:36
-
-
Save drnic/4d2f38aaec84b6eb5a82f4ace3e04c18 to your computer and use it in GitHub Desktop.
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
genesis* |
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 | |
set -e | |
echo NAME=${NAME:?required} | |
echo BINNAME=${BINNAME:?required} | |
echo VERSION=${VERSION:?required} | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd $DIR | |
if [[ ! -f ${NAME}_${VERSION}_amd64.deb ]]; then | |
echo "Missing Debian file ${NAME}_${VERSION}_amd64.deb" | |
exit 1 | |
fi | |
set -x | |
echo 'deb [trusted=yes] https://starkandwayne-debian-apt.s3.amazonaws.com stable main' > /etc/apt/sources.list.d/myrepo.list | |
apt-get update | |
dpkg --info ${NAME}_${VERSION}_amd64.deb | |
dpkg -c ${NAME}_${VERSION}_amd64.deb | |
dpkg -i ${NAME}_${VERSION}_amd64.deb | |
$BINNAME -v |
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 | |
set -e | |
echo NAME=${NAME:?required} | |
echo BINNAME=${BINNAME:?required} | |
set -x | |
echo 'deb [trusted=yes] https://starkandwayne-debian-apt.s3.amazonaws.com stable main' > /etc/apt/sources.list.d/myrepo.list | |
apt-get update | |
apt-get install $NAME -y | |
$BINNAME -v |
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
NAME=genesis | |
BINNAME=genesis | |
VERSION=2.0.7 | |
LICENSE=MIT | |
DESCRIPTION="Genesis - A BOSH Deployment Paradigm" | |
URL=https://github.com/starkandwayne/genesis | |
MAINTAINERS=https://github.com/starkandwayne/genesis/graphs/contributors | |
VENDOR="Stark & Wayne LLC" | |
UBUNTU=frodenas/ubuntu | |
RELEASE_BUCKET=starkandwayne-debian-apt | |
all: docker-test-deb | |
$(NAME)-$(VERSION): | |
rm -f $(NAME)-$(VERSION) | |
curl -L https://github.com/starkandwayne/genesis/releases/download/v$(VERSION)/genesis -o $(NAME)-$(VERSION) | |
chmod +x $(NAME)-$(VERSION) | |
$(NAME)_$(VERSION)_amd64.deb: $(NAME)-$(VERSION) | |
rm -f $(NAME)*.deb | |
fpm -s dir -t deb -n $(NAME) -v $(VERSION) \ | |
--provides $(NAME) \ | |
--deb-recommends bosh-cli \ | |
--deb-recommends safe \ | |
--deb-recommends spruce \ | |
--deb-recommends vault \ | |
--vendor $(VENDOR) --license $(LICENSE) -m $(MAINTAINERS) --description $(DESCRIPTION) --url $(URL) \ | |
--deb-use-file-permissions \ | |
--deb-no-default-config-files \ | |
genesis-$(VERSION)=/usr/bin/$(NAME) | |
.PHONY: docker-test | |
docker-test-deb: $(NAME)_$(VERSION)_amd64.deb | |
docker run -ti \ | |
-e NAME=$(NAME) -e BINNAME=$(BINNAME) -e VERSION=$(VERSION) \ | |
-v ${CURDIR}:/packages $(UBUNTU) /packages/install-deb.sh | |
release: $(NAME)_$(VERSION)_amd64.deb | |
deb-s3 upload $(NAME)_$(VERSION)_amd64.deb --bucket $(RELEASE_BUCKET) | |
docker-test-release: $(NAME)_$(VERSION)_amd64.deb | |
docker run -ti \ | |
-e NAME=$(NAME) -e BINNAME=$(BINNAME) -e VERSION=$(VERSION) \ | |
-v ${CURDIR}:/packages $(UBUNTU) /packages/install-release.sh | |
clean: | |
rm -f $(NAME)* | |
dependencies: | |
gem install fpm deb-s3 --no-ri --no-rdoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment