2
0
MasterPassword/platform-independent/cli-c/distribute

21 lines
831 B
Plaintext
Raw Normal View History

2014-10-18 19:42:49 +00:00
#!/usr/bin/env bash
set -e
cd "${BASH_SOURCE%/*}"
tag=$(git describe)
commit=$(git describe --long --dirty)
[[ $tag && $commit = $tag* ]] || exit 1
git show --show-signature --pretty=format:%H --quiet "$tag" > VERSION
mpwArchive=mpw-$commit.tar.gz
2014-10-18 19:42:49 +00:00
[[ -e $mpwArchive ]] && echo "WARNING: $mpwArchive already exists. Will overwrite."
read -n1 -p "Will prepare and release $mpwArchive. Press a key to continue or ^C to abort."
git ls-files -z . | xargs -0 tar -Lcvzf "$mpwArchive"
2014-10-18 19:42:49 +00:00
echo "$mpwArchive ready, SHA256: $(openssl sha -sha256 < "$mpwArchive")"
cd ../../public/site/current
ln -sf "../../../platform-independent/cli-c/$mpwArchive"; [[ -e $_ ]]
ln -sf "$mpwArchive" "masterpassword-cli.tar.gz"; [[ -e $_ ]]
echo "Linked from site, please update your hyperlinks to point to https://ssl.masterpasswordapp.com/$mpwArchive"