Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mostalive/54dbbf388f6ca58795d6ae37fef22890 to your computer and use it in GitHub Desktop.
Save mostalive/54dbbf388f6ca58795d6ae37fef22890 to your computer and use it in GitHub Desktop.
Bash script to create package description to include in purescript 'package-set'. Automatically retrieves git repository url and latest tag. Doesn't do formatting yet, and generates one trailing
#!/bin/bash
echo 'usage: purescript-package2set.sh <packagename>'
set -euo pipefail
PACKAGENAME=$1
REPO=`git remote get-url origin`
VERSION=`git tag | tail -n 1`
echo "\"$1\": {"
echo " \"dependencies\": ["
psc-package dependencies | sed s/^/\"/ | sed s/$/\",/
echo "],"
echo "\"repo\":\"$REPO\","
echo "\"version\":\"$VERSION\""
echo "},"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment