Skip to content

Commit

Permalink
second attempt to fix Makefile on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Nov 10, 2023
1 parent f755f33 commit 2b463d4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ URL=`git config --get remote.origin.url`
UNICODE=https://unicode.org/Public/UNIDATA/UnicodeData.txt

MAKE=make
ECHO=echo
GIT=git
CD=cd
SED=sed
CP=cp
RM=rm
TEST=test
CAT=cat
TOUCH=touch
NPM=npm
NODE=node
WGET=wget
Expand Down Expand Up @@ -66,16 +68,18 @@ assets/classDiagram.svg: assets/classDiagram
$(MERMAID) -i assets/classDiagram -o assets/classDiagram.svg

README.md: templates/README.md dist/lips.js .$(VERSION)
$(ECHO) "building README ..."
$(GIT) branch | grep '* devel' > /dev/null && $(SED) -e "s/{{VER}}/DEV/g" -e \
"s/{{VER_DASH}}/$(VERSION_DASH)/g" -e "s/{{BRANCH}}/$(BRANCH)/g" -e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" \
"s#{{VER_DASH}}#$(VERSION_DASH)#g" -e "s#{{BRANCH}}#$(BRANCH)#g" -e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" \
-e "s/{{YEAR}}/${YEAR}/g" -e "s/{{DATE}}/${DATE_SHORT}/" -e "s/{{COMMIT}}/$(COMMIT)/g" \
< templates/README.md > README.md || \
$(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s/{{BRANCH}}/$(BRANCH)/g" -e "s/{{YEAR}}/${YEAR}/g" \
-e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" -e "s/{{COMMIT}}/$(COMMIT)/g" -e "s/{{DATE}}/${DATE_SHORT}/" \
-e "s/{{VER_DASH}}/$(VERSION_DASH)/g" < templates/README.md > README.md

.$(VERSION): Makefile
touch .$(VERSION)
@$(ECHO) "building from branch ${BRANCH}"
$(TOUCH) .$(VERSION)

publish-beta:
$(GIT) clone $(URL) --depth 1 npm
Expand Down
16 changes: 10 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b463d4

Please sign in to comment.