;tools: just, Shake cleanups

This commit is contained in:
Simon Michael 2024-12-07 15:58:53 -10:00
parent bab557b3b5
commit 9081232b10
2 changed files with 16 additions and 20 deletions

View File

@ -580,12 +580,6 @@ INSTALLING:
$STACK install --local-bin-path bin --flag '*:debug' {{ STACKARGS }}
for e in hledger hledger-ui hledger-web ; do mv bin/$e bin/$e-dbg; echo "bin/$e-dbg"; done
# # make must be GNU Make 4.3+
# .PHONY: shellcompletions
# # update shell completions in hledger package
# shellcompletions:
# make -C hledger/shell-completion/ clean-all all
# On gnu/linux: can't interpolate GTAR here for some reason, and need the shebang line.
# linux / mac only for now, does not handle the windows zip file.
# download github release VER binaries for OS (linux, mac) and ARCH (x64, arm64) to bin/old/hledger*-VER
@ -619,11 +613,6 @@ symlink-web-dirs:
ln -sf hledger-web/static
ln -sf hledger-web/templates
# update shell completions in hledger package
shell-completions:
make -C hledger/shell-completion/ clean-all all
# ** Benchmarking ------------------------------------------------------------
BENCHMARKING:
@ -958,7 +947,7 @@ twih: # *DATE:
#!/usr/bin/env osh
#BEG=`just _dateorsecondlatestfriday $DATE`
END=`just _todayorlatestfriday $DATE`
cat <<EOS
cat <<EOS: # the colon helps the vscode just highlighter
== TWIH notes: ========================================
last release: `just rel`
@ -974,8 +963,8 @@ twih: # *DATE:
== TWIH draft (in clipboard) : ========================
EOS
(cat <<EOS
EOS:
(cat <<EOS:
---
## This Week In Hledger $END
@ -995,7 +984,7 @@ twih: # *DATE:
<https://hledger.org/news.html#this-week-in-hledger-$END>
EOS
EOS:
) | tee /dev/tty | pbcopy
GITSHORTFMT := "--format='%ad %s' --date=short"
@ -1016,7 +1005,7 @@ commitlog *DATE:
git -C ../plaintextaccounting.org log {{ GITSHORTFMT }} --since $BEG --until $END --reverse | sed -E -e 's/ ;/ /'
echo
WORKLOG := "../../notes/CLOUD/hledger log.md"
WORKLOG := "../../notes/CLOUD/hledger.md"
# Show dates logged in hledger work log.
@worklogdates:
@ -1377,6 +1366,11 @@ sccv:
# list-commits: $(call def-help,list-commits, list all commits chronologically and numbered)
# @git log --format='%ad %h %s (%an)' --date=short --reverse | cat -n
# update shell completions in hledger package
@completions:
make -C hledger/shell-completion/
echo "now please commit any changes in hledger/shell-completion/"
# Make git release tags for the hledger packages and project, assuming a complete single-version release.
@reltag:
for p in $PACKAGES; do just reltagpkg $p; done

View File

@ -403,6 +403,7 @@ main = do
-- MANUALS
-- Generate the manuals in plain text, nroff, info, and markdown formats.
-- NB you should run "Shake cmddocs" before this, it's not automatic (?)
phony "manuals" $ do
need $ concat [
nroffmanuals
@ -600,7 +601,7 @@ main = do
-- With -c, also commit any changes in the .md and .txt files.
-- The hledger build should up to date when running this. XXX how to check ? need ["build"] is circular
phony "cmddocs" $ do
liftIO $ putStrLn "please ensure the hledger build is up to date"
liftIO $ putStrLn "please ensure the hledger build is up to date. Running all commands..."
need commandtxts
when commit $ commitIfChanged ";doc: update command docs" $ commandmds <> commandtxts
@ -639,7 +640,7 @@ main = do
let cmdname = map toLower $ takeBaseName src
do
let shellcmd = "stack exec -- hledger -h " <> cmdname
liftIO $ putStrLn $ "running " <> shellcmd <> " to get options help"
-- liftIO $ putStrLn $ "running " <> shellcmd <> " to get options help"
cmdhelp <- lines . fromStdout <$> (cmd Shell shellcmd :: Action (Stdout String))
let
cmdflagshelp = takeWhile (not.null) $ dropWhile (/="Flags:") cmdhelp
@ -659,8 +660,9 @@ main = do
-- CHANGELOGS
let
-- git log showing short commit hashes
gitlog = "git log --abbrev-commit"
-- git log showing short commit hashes.
-- In 2024 git is showing 9 digits, 1 more than jj - show 8 for easier interop
gitlog = "git log --abbrev=8"
-- git log formats suitable for changelogs/release notes
-- %s=subject, %an=author name, %n=newline if needed, %w=width/indent1/indent2, %b=body, %h=hash