mirror of
https://github.com/haskoin/haskoin-core.git
synced 2024-09-11 10:05:34 +03:00
Add release script
This commit is contained in:
parent
d49455a277
commit
bdb6eba6c4
32
scripts/release
Executable file
32
scripts/release
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
find() {
|
||||
local thing="$1"
|
||||
perl -lnE "say if s/^\\s*$thing:\\s*([^\\s]+)\\s*\$/\\1/" package.yaml
|
||||
}
|
||||
|
||||
if [[ ! -f package.yaml ]]
|
||||
then
|
||||
echo "No package.yaml present" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
package="$(find name)"
|
||||
ver="$(find version)"
|
||||
|
||||
if [[ -z $package || -z $ver ]]
|
||||
then
|
||||
echo "No package or version found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "package: $package"
|
||||
echo "ver: $ver"
|
||||
|
||||
git tag -m "Version $ver" "v$ver"
|
||||
git push origin master
|
||||
git push origin "v$ver"
|
||||
stack upload .
|
||||
cabal update
|
||||
cabal new-haddock --enable-documentation --haddock-hyperlink-source --haddock-for-hackage
|
||||
cabal upload -d --publish "dist-newstyle/$package-$ver-docs.tar.gz"
|
Loading…
Reference in New Issue
Block a user