mirror of
https://github.com/haskoin/haskoin-core.git
synced 2024-09-11 10:05:34 +03:00
33 lines
640 B
Bash
Executable File
33 lines
640 B
Bash
Executable File
#!/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"
|