Skip to content
Snippets Groups Projects
Commit 95d60f03 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

WS-1518: use local flag in download.sh if delivery path exists

parent bfc05f23
No related branches found
No related tags found
1 merge request!1202WS-1518: use local flag in download.sh if delivery path exists
Pipeline #8106 passed
"""Update download.sh to use download destination
Revision ID: 8a6aa0fd4a91
Revises: 51b2cb1b61c6
Create Date: 2023-01-12 13:42:04.644101
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "8a6aa0fd4a91"
down_revision = "51b2cb1b61c6"
branch_labels = None
depends_on = None
old_download = """#!/bin/sh
set -o errexit
chmod 770 .
./productfetcher --for-download {{#sdm_only}}--sdm-only{{/sdm_only}}{{^multiple_fetch}} --product-locator $2{{/multiple_fetch}}{{#multiple_fetch}}{{product_locator}}{{/multiple_fetch}}
./deliver{{#create_tar_file}} --tar{{/create_tar_file}}{{#username}} -u {{username}}{{/username}} -r . --prefix $1
"""
new_download = """#!/bin/sh
set -o errexit
chmod 770 .
./productfetcher --for-download {{#sdm_only}}--sdm-only{{/sdm_only}}{{^multiple_fetch}} --product-locator $2{{/multiple_fetch}}{{#multiple_fetch}}{{product_locator}}{{/multiple_fetch}}
./deliver{{#create_tar_file}} --tar{{/create_tar_file}}{{#username}} -u {{username}}{{/username}} {{#destination_directory}} -l {{destination_directory}}{{/destination_directory}} -r . --prefix $1
"""
def upgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{new_download}' WHERE filename='download.sh'
"""
)
def downgrade():
op.execute(
f"""
UPDATE workflow_templates
SET content=E'{old_download}' WHERE filename='download.sh'
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment