Skip to content

Commit cb421e1

Browse files
committed
Add make target to check keyring package during make dev/staging
On staging setups, check that the dev package is not installed, because it will supersede the staging package due versioning
1 parent bc911b1 commit cb421e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,23 @@ all: assert-dom0
2424

2525
dev staging: assert-dom0 ## Configures and builds a dev or staging environment
2626
./scripts/configure-environment.py --env $@
27+
$(MAKE) assert-keyring-%
2728
$(MAKE) validate
2829
$(MAKE) prep-dev
2930
sdw-admin --apply
3031

32+
.PHONY: assert-keyring-%
33+
assert-keyring-%: ## Correct keyring pkg installed
34+
@rpm -q securedrop-workstation-keyring-$* >/dev/null 2>&1 || { \
35+
echo "Error: Install securedrop-workstation-keyring-$*" >&2; exit 1; \
36+
}
37+
@if [ "$*" = "staging" ]; then \
38+
if rpm -q securedrop-workstation-keyring-dev >/dev/null 2>&1; then \
39+
echo "Error: Uninstall securedrop-workstation-keyring-dev" >&2; \
40+
exit 1; \
41+
fi \
42+
fi
43+
3144
.PHONY: build-rpm
3245
build-rpm: OUT:=build-log/securedrop-workstation-$(shell date +%Y%m%d).log
3346
build-rpm: ## Build RPM package

0 commit comments

Comments
 (0)