Skip to content

Commit

Permalink
Make task to fetch an empty file
Browse files Browse the repository at this point in the history
Now that Jermolene/TiddlyWiki5#5455 is
merged we can use a standard empty file.
  • Loading branch information
simonbaird committed Feb 1, 2021
1 parent 6c8bdda commit 05c74c9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

_help:
@echo Available tasks:
@grep '^[^_#[:space:]][^=/[:space:]]*:' Makefile | cut -d: -f1 | xargs -n1 echo ' make'
@grep '^[^_#\\$$[:space:]][^=/[:space:]]*:' Makefile | cut -d: -f1 | xargs -n1 echo ' make'

# The build args are important here, the build will fail without them
build-base: cleanup cert
Expand Down Expand Up @@ -51,6 +51,22 @@ bundle-install:
secrets:
-docker-compose run --rm --no-deps base bash -c "EDITOR=vi bin/rails credentials:edit"

# Currently we need the prerelease, later we'll switch to stable versions
EMPTY_URL=https://tiddlywiki.com/prerelease/empty.html
EMPTY_TARGET=rails/empties/tw5.html
$(EMPTY_TARGET):
curl -s $(EMPTY_URL) -o $(EMPTY_TARGET)

empty: $(EMPTY_TARGET) empty-version

update-empty: clear-empty empty

empty-version:
@grep '<meta name="tiddlywiki-version"' $(EMPTY_TARGET) | cut -d\" -f4

clear-empty:
@rm -f $(EMPTY_TARGET)

# Try to be smart about how to run the tests
# TODO: Refactor and integrate with "shell" and "join"
tests:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Install all ruby gems, node modules, and initialize the databases:

make rails-init

Add a TW empty file to rails/empties/tw5.html. (For best results it needs to
be slightly modified. Todo: Explain how to get the modifications.)
Fetch an empty TW file:

make empty

Run the test suite:

Expand Down
1 change: 1 addition & 0 deletions etc/create-build-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
echo branch: `git rev-parse --abbrev-ref HEAD`
# Might be useful later
#echo tag: `git describe --tags --abbrev=0`
echo empty: `make empty-version`
) > etc/build-info.txt

0 comments on commit 05c74c9

Please sign in to comment.