;tools: just, Shake cleanups
This commit is contained in:
parent
bab557b3b5
commit
9081232b10
26
Justfile
26
Justfile
@ -580,12 +580,6 @@ INSTALLING:
|
|||||||
$STACK install --local-bin-path bin --flag '*:debug' {{ STACKARGS }}
|
$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
|
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.
|
# 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.
|
# 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
|
# 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/static
|
||||||
ln -sf hledger-web/templates
|
ln -sf hledger-web/templates
|
||||||
|
|
||||||
# update shell completions in hledger package
|
|
||||||
shell-completions:
|
|
||||||
make -C hledger/shell-completion/ clean-all all
|
|
||||||
|
|
||||||
|
|
||||||
# ** Benchmarking ------------------------------------------------------------
|
# ** Benchmarking ------------------------------------------------------------
|
||||||
BENCHMARKING:
|
BENCHMARKING:
|
||||||
|
|
||||||
@ -958,7 +947,7 @@ twih: # *DATE:
|
|||||||
#!/usr/bin/env osh
|
#!/usr/bin/env osh
|
||||||
#BEG=`just _dateorsecondlatestfriday $DATE`
|
#BEG=`just _dateorsecondlatestfriday $DATE`
|
||||||
END=`just _todayorlatestfriday $DATE`
|
END=`just _todayorlatestfriday $DATE`
|
||||||
cat <<EOS
|
cat <<EOS: # the colon helps the vscode just highlighter
|
||||||
== TWIH notes: ========================================
|
== TWIH notes: ========================================
|
||||||
|
|
||||||
last release: `just rel`
|
last release: `just rel`
|
||||||
@ -974,8 +963,8 @@ twih: # *DATE:
|
|||||||
|
|
||||||
== TWIH draft (in clipboard) : ========================
|
== TWIH draft (in clipboard) : ========================
|
||||||
|
|
||||||
EOS
|
EOS:
|
||||||
(cat <<EOS
|
(cat <<EOS:
|
||||||
---
|
---
|
||||||
|
|
||||||
## This Week In Hledger $END
|
## This Week In Hledger $END
|
||||||
@ -995,7 +984,7 @@ twih: # *DATE:
|
|||||||
<https://hledger.org/news.html#this-week-in-hledger-$END>
|
<https://hledger.org/news.html#this-week-in-hledger-$END>
|
||||||
|
|
||||||
|
|
||||||
EOS
|
EOS:
|
||||||
) | tee /dev/tty | pbcopy
|
) | tee /dev/tty | pbcopy
|
||||||
|
|
||||||
GITSHORTFMT := "--format='%ad %s' --date=short"
|
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/ ;/ /'
|
git -C ../plaintextaccounting.org log {{ GITSHORTFMT }} --since $BEG --until $END --reverse | sed -E -e 's/ ;/ /'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
WORKLOG := "../../notes/CLOUD/hledger log.md"
|
WORKLOG := "../../notes/CLOUD/hledger.md"
|
||||||
|
|
||||||
# Show dates logged in hledger work log.
|
# Show dates logged in hledger work log.
|
||||||
@worklogdates:
|
@worklogdates:
|
||||||
@ -1377,6 +1366,11 @@ sccv:
|
|||||||
# list-commits: $(call def-help,list-commits, list all commits chronologically and numbered)
|
# 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
|
# @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.
|
# Make git release tags for the hledger packages and project, assuming a complete single-version release.
|
||||||
@reltag:
|
@reltag:
|
||||||
for p in $PACKAGES; do just reltagpkg $p; done
|
for p in $PACKAGES; do just reltagpkg $p; done
|
||||||
|
|||||||
10
Shake.hs
10
Shake.hs
@ -403,6 +403,7 @@ main = do
|
|||||||
-- MANUALS
|
-- MANUALS
|
||||||
|
|
||||||
-- Generate the manuals in plain text, nroff, info, and markdown formats.
|
-- 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
|
phony "manuals" $ do
|
||||||
need $ concat [
|
need $ concat [
|
||||||
nroffmanuals
|
nroffmanuals
|
||||||
@ -600,7 +601,7 @@ main = do
|
|||||||
-- With -c, also commit any changes in the .md and .txt files.
|
-- 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
|
-- The hledger build should up to date when running this. XXX how to check ? need ["build"] is circular
|
||||||
phony "cmddocs" $ do
|
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
|
need commandtxts
|
||||||
when commit $ commitIfChanged ";doc: update command docs" $ commandmds <> commandtxts
|
when commit $ commitIfChanged ";doc: update command docs" $ commandmds <> commandtxts
|
||||||
|
|
||||||
@ -639,7 +640,7 @@ main = do
|
|||||||
let cmdname = map toLower $ takeBaseName src
|
let cmdname = map toLower $ takeBaseName src
|
||||||
do
|
do
|
||||||
let shellcmd = "stack exec -- hledger -h " <> cmdname
|
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))
|
cmdhelp <- lines . fromStdout <$> (cmd Shell shellcmd :: Action (Stdout String))
|
||||||
let
|
let
|
||||||
cmdflagshelp = takeWhile (not.null) $ dropWhile (/="Flags:") cmdhelp
|
cmdflagshelp = takeWhile (not.null) $ dropWhile (/="Flags:") cmdhelp
|
||||||
@ -659,8 +660,9 @@ main = do
|
|||||||
-- CHANGELOGS
|
-- CHANGELOGS
|
||||||
|
|
||||||
let
|
let
|
||||||
-- git log showing short commit hashes
|
-- git log showing short commit hashes.
|
||||||
gitlog = "git log --abbrev-commit"
|
-- 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
|
-- 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
|
-- %s=subject, %an=author name, %n=newline if needed, %w=width/indent1/indent2, %b=body, %h=hash
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user