Added local tool aptfile to use with apt based development installation. (#772)

This commit is contained in:
Steve Karg
2024-09-21 09:26:34 -05:00
committed by GitHub
parent 3d86873346
commit fe1fd39261
7 changed files with 596 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
VERSION = 1.1.0
DOCKER_IMAGE = aptfile-$(VERSION)
shellcheck:
ifeq ($(shell shellcheck > /dev/null 2>&1 ; echo $$?),127)
ifeq ($(shell uname),Darwin)
brew install shellcheck
else
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck
endif
endif
lint: shellcheck
shellcheck bin/aptfile
clean:
rm -f *.deb
deb: clean
sed -i -e 's/"VERSION"/$(VERSION)/' Dockerfile && rm Dockerfile-e
docker build -t $(DOCKER_IMAGE) .
bash -c 'ID=$$(docker run -i -a stdin $(DOCKER_IMAGE)) && docker cp $$ID:/data/aptfile_$(VERSION)_amd64.deb . && docker rm $$ID'
git checkout -- Dockerfile
release:
@git status | grep -q "working directory clean" || (echo "You have uncomitted changes" && exit 1)
$(MAKE) deb
.PHONY: shellcheck lint clean deb release