File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ $(PACKAGES_DIR):
3535 @mkdir -p $(PACKAGES_DIR ) /deb && mkdir -p $(PACKAGES_DIR ) /rpm && mkdir -p $(PACKAGES_DIR ) /apk
3636
3737.PHONY : package
38- package : $(PACKAGES_DIR ) # ### Create final packages for all supported distros
38+ package : gpg-key $(PACKAGES_DIR ) # ### Create final packages for all supported distros
3939
4040# Build binaries for all supported architectures
4141 @for arch in $(DEB_ARCHS); do \
@@ -145,7 +145,12 @@ package: $(PACKAGES_DIR) #### Create final packages for all supported distros
145145
146146.PHONY : gpg-key
147147gpg-key : # # Generate GPG public key
148- $$(gpg --import $(NFPM_SIGNING_KEY_FILE ) ) ; \
148+ @if [ -z " $( NFPM_SIGNING_KEY_FILE) " ]; then \
149+ echo " NFPM_SIGNING_KEY_FILE is not set. Exiting..." ; \
150+ exit 1; \
151+ fi
152+ @echo " Generating GPG public key for package signing..." ;
153+ @$$(gpg --import $(NFPM_SIGNING_KEY_FILE ) ) ; \
149154 keyid=$$(gpg --list-keys NGINX | egrep -A1 "^pub" | egrep -v "^pub" | tr -d '[:space:]' ) ; \
150155 if [ -z " $$ keyid" ]; then echo " Error: GPG key not found." ; exit 1; fi ; \
151156 # Check if the key is expired \
You can’t perform that action at this time.
0 commit comments