Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync extensions for JEDI #1418

Merged
merged 22 commits into from
Mar 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use environment varible for commit nums to diff
  • Loading branch information
fengzhou-msft committed Mar 20, 2020
commit 8e01b8847e1393a646edc26ff21ee686dc49c703
3 changes: 2 additions & 1 deletion scripts/ci/sync_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
STORAGE_ACCOUNT_KEY = os.getenv('AZURE_EXTENSION_TARGET_STORAGE_ACCOUNT_KEY')
STORAGE_ACCOUNT = os.getenv('AZURE_EXTENSION_TARGET_STORAGE_ACCOUNT')
STORAGE_CONTAINER = os.getenv('AZURE_EXTENSION_TARGET_STORAGE_CONTAINER')
COMMIT_NUM = os.getenv('AZURE_EXTENSION_NUM') or 1


def _get_updated_extension_names():
cmd = 'git --no-pager diff --diff-filter=ACMRT HEAD~1 -- src/index.json'
cmd = 'git --no-pager diff --diff-filter=ACMRT HEAD~{} -- src/index.json'.format(COMMIT_NUM)
updated_content = check_output(cmd.split()).decode('utf-8')
updated_urls = [line.replace('+', '') for line in updated_content.splitlines() if line.startswith('+') and not line.startswith('+++') and 'downloadUrl' in line]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not load the json content and get from key directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we only extract updated downloadUrl from git diff for incremental sync.

updated_exts = []
Expand Down