File: sdk_generate.sh

package info (click to toggle)
python-azure 20250829%2Bgit-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 756,824 kB
  • sloc: python: 6,224,989; ansic: 804; javascript: 287; makefile: 198; sh: 195; xml: 109
file content (24 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

TMPDIR="$(dirname $(dirname $(readlink -f "$0")))/venv"
export TMPDIR
VIRTUAL_ENV=$TMPDIR/venv-sdk
echo "$VIRTUAL_ENV"
export VIRTUAL_ENV
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH

# node version degrade
npm install -g n
n 18.19.0
echo "$PATH"
export PATH="/usr/local/n/versions/node/18.19.0/bin:$PATH"

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