todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.55k stars 712 forks source link

Improved Makefile. #436

Open alissa-huskey opened 3 months ago

alissa-huskey commented 3 months ago

I initially created this fork becaus when I ran make install the VERSION variable was not updated in todo.sh. So todo -V would produce:

TODO.TXT Command Line Interface v@DEV_VERSION@
...

But now I can't reproduce the problem. Shrug.

So instead: Here's a nicer Makefile if you want it!

Usage features:

Implementation changes:

You can verify that the dist files are still generated correctly with the following:

mkdir -p tmp && cd tmp
git clone git@github.com:todotxt/todo.txt-cli.git todo
git clone --branch makefile git@github.com:alissa-huskey/todo.txt-cli.git todo-fork
mkdir dist dist-fork
make -C todo dist && make -C todo-fork dist
tar xzvf todo/*.tar.gz --directory ./dist && tar xzvf todo-fork/*.tar.gz --directory dist-fork

# confirm they contain the same files
diff <(ls dist/todo*/) <(ls dist-fork/todo*/)

# confirm the contents of all files are the same
for f in dist/todo*/*; do diff -w ${f} dist-fork/todo*/${f##*/} ; done

Hope you find it useful!