mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
"make release" extracts version number from Options.hs, tags and uploads to hackage
This commit is contained in:
parent
7db0881b40
commit
6cd97f3f64
4
Makefile
4
Makefile
@ -28,6 +28,10 @@ test:
|
||||
@./hledger.hs test
|
||||
@./regtest.py
|
||||
|
||||
VERSION=`grep 'versionno =' Options.hs | perl -pe 's/.*"(.*?)"/\1/'`
|
||||
release:
|
||||
cabal sdist && darcs tag $(VERSION) && cabal upload dist/hledger-$(VERSION).tar.gz
|
||||
|
||||
tag:
|
||||
rm -f TAGS; hasktags -e *hs Ledger/*hs
|
||||
|
||||
|
@ -3,6 +3,7 @@ where
|
||||
import System
|
||||
import System.Console.GetOpt
|
||||
import System.Directory
|
||||
import Text.Printf
|
||||
import Ledger.AccountName (negativepatternchar)
|
||||
|
||||
usagehdr = "Usage: hledger [OPTS] balance|print|register [ACCTPATS] [-- DESCPATS]\n\nOptions"++warning++":"
|
||||
@ -46,7 +47,8 @@ data Opt =
|
||||
|
||||
usage = usageInfo usagehdr options ++ usageftr
|
||||
|
||||
version = "hledger version 0.2 \n"
|
||||
versionno = "0.2"
|
||||
version = printf "hledger version %s \n" versionno :: String
|
||||
|
||||
-- | Parse the command-line arguments into ledger options, ledger command
|
||||
-- name, and ledger command arguments
|
||||
|
Loading…
Reference in New Issue
Block a user