Skip to content

Commit

Permalink
auto aupdate disabled for sentinel due to complicated way fetching ve…
Browse files Browse the repository at this point in the history
…rsions (#359)
  • Loading branch information
maximmi authored Apr 16, 2020
1 parent 19ad0c5 commit bc9fad2
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions vendor/sentinel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Sentinel is not an open source, so we don't want to distribute it
export PACKAGE_ENABLED = false
export AUTO_UPDATE_ENABLED = false

include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk
Expand All @@ -11,31 +12,6 @@ export PACKAGE_NAME ?= sentinel
export DOWNLOAD_URL ?= https://releases.hashicorp.com/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/$(PACKAGE_NAME)_$(PACKAGE_VERSION)_$(OS)_$(ARCH).zip
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary

VERSION:
@version=$$(curl -s "https://releases.hashicorp.com/$(PACKAGE_NAME)/" | sed -nE 's/.*\<a\shref=\"\/sentinel\/(\d+\.\d+\.\d+)\/.*/\1/pi' | head -n 1); \
if [ $$? -ne 0 ]; then \
exit 1; \
fi; \
if [ "$${version}" == "null" -o "$${version}" == "" ]; then \
echo "ERROR: failed to obtain current version for $(VENDOR)/$(PACKAGE_REPO_NAME)"; \
exit 1; \
else \
echo "$${version}" | tee VERSION; \
fi

CURRENT_VERSION:
@local_version=$$(cat VERSION || echo 0); \
current_version=$$(curl -s "https://releases.hashicorp.com/$(PACKAGE_NAME)/" | sed -nE 's/.*\<a\shref=\"\/sentinel\/(\d+\.\d+\.\d+)\/.*/\1/pi' | head -n 1); \
if [ $$? -ne 0 ]; then \
exit 1; \
elif [ "$${current_version}" == "null" -o -z "$${current_version}" ]; then \
echo "ERROR: failed to obtain current version for $(VENDOR)/$(PACKAGE_REPO_NAME) (got: $${current_version})"; \
exit 1; \
elif [ "$${local_version}" != "$${current_version}" ]; then \
echo "Upgrading $(PACKAGE_NAME) from $${local_version} to $${current_version}"; \
echo "$${current_version}" > VERSION; \
fi

install:
$(call download_zip)

Expand Down

0 comments on commit bc9fad2

Please sign in to comment.