Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Commit

Permalink
hackage-meta: update upload script
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielG committed Nov 1, 2016
1 parent 6fdccfb commit 9ef3e67
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/upload-metadata.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ set -e

PACKAGE=$1
OUTDIR=$2
VERSIONS="$@"

read -p "Username: " user
hidden_prompt "Password" pw


versions="$(curl https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '."normal-version"[]' -r)"
if [ -z "$VERSIONS" ]; then
VERSIONS="$(curl https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '."normal-version"[]' -r)"
#versions="$(curl https://hackage.haskell.org/package/"$PACKAGE"/preferred.json | jq '."deprecated-version"[]' -r)"
fi



echo "Versions: $versions"
echo "Versions: $VERSIONS"

for v in $versions; do
for v in $VERSIONS; do
rev=$(cat $OUTDIR/$PACKAGE-$v.cabal | grep -i "^x-revision:" | tr -s '[:blank:]*' '\t' | cut -f 2)

if [ -z "$rev" ]; then
Expand Down

0 comments on commit 9ef3e67

Please sign in to comment.