Skip to content

Commit

Permalink
Use --for-real parameter to set whether it's a dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Aug 1, 2024
1 parent 19c2b23 commit 784d417
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utilities/spreadsheet_docx/copy_from_bailii_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
SOURCE_BUCKET = "bailii-docx"
UNPUBLISHED_BUCKET = "tna-caselaw-unpublished-assets"
PUBLISHED_BUCKET = "tna-caselaw-assets"
DRY_RUN = "--dryrun"
# DRY_RUN = False
DALMATIAN_INFRASTRUCTURE = "caselaw"
ASSETS_BASE = "https://tna-caselaw-assets.s3.amazonaws.com"
CASELAW_BASE = "https://caselaw.nationalarchives.gov.uk"

SPREADSHEET = "bailii_files.csv"
DRY_RUN = "--for-real" not in sys.argv[1:]
if not DRY_RUN:
print("Running for real...")

# NOTE THIS MUST BE RUN AS A V2 DALMATIAN
# Run `dalmatian version -v 2` first
Expand Down Expand Up @@ -76,7 +77,7 @@ def copy_command(self, target_bucket):
else:
raise RuntimeError

dryrun_bonus = [DRY_RUN] if DRY_RUN else []
dryrun_bonus = ["--dryrun"] if DRY_RUN else []

command = [
"dalmatian",
Expand Down

0 comments on commit 784d417

Please sign in to comment.