datatracker/bin/dump-to-names-json
Jennifer Richards 38b0b2c035 feat: get tool versions without VersionInfo model (#7393) (#7403)
* chore: remove update_external_command_info call

* feat: get tool version without VersionInfo

* chore: Remove VersionInfo model

* chore: Migration to remove VersionInfo

* fix: handle errors better; ignore stderr
2024-05-13 21:41:36 -04:00

17 lines
846 B
Bash

#!/bin/bash
# This script provides a limited selected dump of database content with the
# purpose of generating a test fixture that provides the test data needed
# by the test suite.
#
# The generated data fixture is sorted and normalized in order to produce
# minimal commit diffs which reflect only actual changes in the fixture data,
# without apparent changes resulting only from ordering changes.
set -x
ietf/manage.py dumpdata --indent 1 doc.State doc.BallotType doc.StateType \
mailtrigger.MailTrigger mailtrigger.Recipient name \
group.GroupFeatures stats.CountryAlias dbtemplate.DBTemplate \
| jq --sort-keys "sort_by(.model, .pk)" \
| jq '[.[] | select(.model!="dbtemplate.dbtemplate" or .pk==354)]' > ietf/name/fixtures/names.json