这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions contrib/build-dokku.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
IS_RELEASE=${IS_RELEASE} \
SKIP_GO_CLEAN=true \
make version copyfiles \
&& make deb-dokku deb-sigil \
rpm-dokku rpm-sigil
&& make deb-dokku rpm-dokku

RUN ls -lha /tmp/
41 changes: 2 additions & 39 deletions deb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,12 @@ DOKKU_UPDATE_VERSION ?= 0.2.0
DOKKU_UPDATE_ARCHITECTURE = amd64
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb

define SIGIL_DESCRIPTION
Standalone string interpolator and template processor
Sigil is a command line tool for template processing
and POSIX-compliant variable expansion. It was created
for configuration templating, but can be used for any
text processing.
endef
SIGIL_REPO_NAME ?= gliderlabs/sigil
SIGIL_VERSION ?= 0.4.0
SIGIL_ARCHITECTURE = amd64
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz

ifndef IS_RELEASE
IS_RELEASE = true
endif

export SIGIL_DESCRIPTION

.PHONY: install-from-deb deb-all deb-dokku deb-dokku-update deb-setup deb-sigil
.PHONY: install-from-deb deb-all deb-dokku deb-dokku-update deb-setup

install-from-deb:
@echo "--> Initial apt-get update"
Expand All @@ -45,7 +31,7 @@ install-from-deb:
sudo apt-get update -qq >/dev/null
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku

deb-all: deb-setup deb-dokku deb-sigil deb-dokku-update
deb-all: deb-setup deb-dokku deb-dokku-update
mv $(BUILD_DIRECTORY)/*.deb .
@echo "Done"

Expand Down Expand Up @@ -84,26 +70,3 @@ deb-dokku-update:
--license 'MIT License' \
contrib/dokku-update=/usr/local/bin/dokku-update \
contrib/dokku-update-version=/var/lib/dokku-update/VERSION

deb-sigil:
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin

@echo "-> Downloading package"
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz

@echo "-> Copying files into place"
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil

@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
--version $(SIGIL_VERSION) \
--architecture $(SIGIL_ARCHITECTURE) \
--package $(BUILD_DIRECTORY)/$(SIGIL_PACKAGE_NAME) \
--url "https://github.com/$(SIGIL_REPO_NAME)" \
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
--category utils \
--description "$$SIGIL_DESCRIPTION" \
--license 'MIT License' \
.
25 changes: 1 addition & 24 deletions rpm.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
RPM_ARCHITECTURE = x86_64
DOKKU_RPM_PACKAGE_NAME = dokku-$(DOKKU_VERSION)-1.$(RPM_ARCHITECTURE).rpm
DOKKU_UPDATE_RPM_PACKAGE_NAME = dokku-update-$(DOKKU_UPDATE_VERSION)-1.$(RPM_ARCHITECTURE).rpm
SIGIL_RPM_PACKAGE_NAME = gliderlabs-sigil-$(SIGIL_VERSION)-1.$(RPM_ARCHITECTURE).rpm

.PHONY: rpm-all

rpm-all: rpm-setup rpm-dokku rpm-sigil rpm-dokku-update
rpm-all: rpm-setup rpm-dokku rpm-dokku-update
mv /tmp/*.rpm .
@echo "Done"

Expand Down Expand Up @@ -66,25 +65,3 @@ rpm-dokku-update:
--license 'MIT License' \
contrib/dokku-update=/usr/local/bin/dokku-update \
contrib/dokku-update-version=/var/lib/dokku-update/VERSION

rpm-sigil:
rm -rf /tmp/tmp /tmp/build $(BUILD_DIRECTORY)/$(SIGIL_RPM_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin

@echo "-> Downloading package"
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz

@echo "-> Copying files into place"
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil

@echo "-> Creating $(SIGIL_RPM_PACKAGE_NAME)"
sudo fpm -t rpm -s dir -C /tmp/build -n gliderlabs-sigil \
--version $(SIGIL_VERSION) \
--architecture $(RPM_ARCHITECTURE) \
--package $(BUILD_DIRECTORY)/$(SIGIL_RPM_PACKAGE_NAME) \
--url "https://github.com/$(SIGIL_REPO_NAME)" \
--category utils \
--description "$$SIGIL_DESCRIPTION" \
--license 'MIT License' \
.
2 changes: 1 addition & 1 deletion tests/ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ install_dependencies() {
curl -L "https://packagecloud.io/dokku/dokku/packages/ubuntu/bionic/sshcommand_${SSHCOMMAND_VERSION}_amd64.deb/download.deb" -o "$ROOT_DIR/build/${SSHCOMMAND_PACKAGE_NAME}"
fi

SIGIL_VERSION=$(grep SIGIL_VERSION "${ROOT_DIR}/deb.mk" | head -n1 | cut -d' ' -f3)
SIGIL_VERSION=$(grep SIGIL_VERSION "${ROOT_DIR}/Makefile" | head -n1 | cut -d' ' -f3)
SIGIL_PACKAGE_NAME="gliderlabs-sigil_${SIGIL_VERSION}_amd64.deb"
if [[ ! -f "$ROOT_DIR/build/${SIGIL_PACKAGE_NAME}" ]]; then
curl -L "https://packagecloud.io/dokku/dokku/packages/ubuntu/bionic/gliderlabs-sigil_${SIGIL_VERSION}_amd64.deb/download.deb" -o "$ROOT_DIR/build/${SIGIL_PACKAGE_NAME}"
Expand Down