Skip to content

Commit

Permalink
More debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
a4z committed Dec 22, 2023
1 parent 5556b53 commit b2d6f8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
path: "requirements.txt"
- name: Download Generator
run: |
python get-generator.py $GENERATOR_BUILID
python get-generator.py $GENERATOR_BUILID ${{ secrets.GENERATOR_DL_TOKEN }}
env:
GENERATOR_BUILID: ${{ env.GENERATOR_BUILID }}
GENERATOR_DL_TOKEN: ${{ secrets.GENERATOR_DL_TOKEN }}
Expand Down
15 changes: 11 additions & 4 deletions get-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
10. Run the generator
"""

dl_arg = sys.argv[1]
if not dl_arg:
sys.exit('No argument given')


key_arg = sys.argv[2]

if key_arg:
print(f'Using key: {key_arg}')
os.environ['GENERATOR_DL_TOKEN'] = key_arg

# Get the token from the environment variable
TOKEN_ENV_VAR='GENERATOR_DL_TOKEN'
TOKEN = os.getenv(TOKEN_ENV_VAR)
Expand Down Expand Up @@ -148,10 +159,6 @@ def get_latest_pre_release(owner, repo):
make_executable(dl_file)
break

# Get the argument, TODO, use argparse and add optional a folder argument
dl_arg = sys.argv[1]
if not dl_arg:
sys.exit('No argument given')

owner = 'cross-language-cpp'
repo = 'djinni-generator'
Expand Down

0 comments on commit b2d6f8e

Please sign in to comment.