Skip to content

Commit

Permalink
Refactor: extract hashsum file name
Browse files Browse the repository at this point in the history
  • Loading branch information
szszszsz committed Jul 30, 2021
1 parent 62af34d commit 81ec22e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build:
after_script:
- wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/}
- mkdir -p artifacts
- cp ./src/*.hex artifacts
- cp ./src/*.hex ./src/*sha256sum artifacts
artifacts:
paths:
- artifacts
11 changes: 6 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ include build.mk
GIT=$(shell git describe)
FIRMWARE=nitrokey-storage-$(GIT).hex
FIRMWARE_CLEAN=nitrokey-storage-$(GIT)-reproducible.hex
HASHFN=sha256sum

all: $(FIRMWARE_CLEAN) $(FIRMWARE) firmware_info firmware.lss sha256sum
all: $(FIRMWARE_CLEAN) $(FIRMWARE) firmware_info firmware.lss $(HASHFN)
-rm firmware.hex firmware-extended.hex
ls -lh *hex *sha256sum
@cat sha256sum
ls -lh *hex *sha256sum $(HASHFN)
@cat $(HASHFN)

#%.sha256sum: %
# sha256sum $< > $@

sha256sum: $(FIRMWARE_CLEAN) $(FIRMWARE)
$(HASHFN): $(FIRMWARE_CLEAN) $(FIRMWARE)
sha256sum $^ > $@

$(FIRMWARE): firmware-extended.hex
cp $< $@

.PHONY: clean_artifacts
clean_artifacts:
-rm *sha256sum *hex
-rm *sha256sum *hex $(HASHFN)

.PHONY: clean
clean:
Expand Down

0 comments on commit 81ec22e

Please sign in to comment.