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

[Python] python track1 new pipeline #16489

Merged
merged 2 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 13 additions & 6 deletions scripts/automation_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ sudo npm install -g n
sudo n 10.15.0
export PATH=/usr/local/n/versions/node/10.15.0/bin:$PATH

# generate code and package
python -m packaging_tools.auto_codegen "$1" "$TMPDIR/venv-sdk/auto_temp.json" 2>&1
TEMP_FILE="$TMPDIR/venv-sdk/auto_temp.json"
# generate code
python -m packaging_tools.auto_codegen "$1" "$TEMP_FILE" 2>&1
echo "[Generate] codegen done!!!"
python -m packaging_tools.auto_package "$TMPDIR/venv-sdk/auto_temp.json" "$2" 2>&1
echo "[Generate] generate done!!!"
if [ ! -f "$TEMP_FILE" ]; then
echo "[Autorest]$TEMP_FILE does not exist!!!Error happened during codegen"
exit 1
fi

# package
python -m packaging_tools.auto_package "$TEMP_FILE" "$2" 2>&1
echo "[Generate] generate done!!!"
if [ ! -f "$2" ]; then
echo "[Autorest]$2 does not exist!!!"
fi
echo "[Autorest]$2 does not exist!!!Error happened during package"
exit 1
fi
2 changes: 0 additions & 2 deletions tools/azure-sdk-tools/packaging_tools/auto_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def change_log_generate(package_name):
def main(generate_input, generate_output):
with open(generate_input, "r") as reader:
data = json.load(reader)
if not data:
return

sdk_folder = '.'
result = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import shutil
import subprocess


_LOGGER = logging.getLogger(__name__)


Expand Down Expand Up @@ -129,7 +128,8 @@ def execute_simple_command(cmd_line, cwd=None, shell=False, env=None):
universal_newlines=True,
cwd=cwd,
shell=shell,
env=env)
env=env,
encoding='utf-8')
output_buffer = []
for line in process.stdout:
output_buffer.append(line.rstrip())
Expand Down