Download goalert/devtools/scripts/gen-river-migration.sh from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/scripts/gen-river-migration.sh
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/scripts/gen-river-migration.sh
-
curl -L -o gen-river-migration.sh https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/devtools/scripts/gen-river-migration.sh
660 Bytes
| set -e | |
| VERSION=$1 | |
| if [ -z "$VERSION" ]; then | |
| echo "Usage: $0 <migration-version>" | |
| exit 1 | |
| fi | |
| go tool river migrate-get --version $VERSION --up >/dev/null 2>&1 || { | |
| echo "Migration version $VERSION does not exist." | |
| exit 1 | |
| } | |
| TARGET=$(make new-migration NAME=import-river-migration-$VERSION | awk '{print $2}') | |
| echo "-- Code generated by ./devtools/scripts/gen-river-migration.sh. DO NOT EDIT." >$TARGET | |
| echo "" >>$TARGET | |
| echo "-- +migrate Up" >>$TARGET | |
| go tool river migrate-get --version $VERSION --up >>$TARGET | |
| echo "" >>$TARGET | |
| echo "-- +migrate Down" >>$TARGET | |
| go tool river migrate-get --version $VERSION --down >>$TARGET | |