@@ -240,33 +240,29 @@ jobs:
240240 artifactName : " PythonWorker"
241241 steps :
242242 - bash : |
243- echo "Releasing from 4.44.0 "
243+ echo "Releasing from $BUILD_SOURCEBRANCHNAME "
244244 sudo apt-get install -y jq
245245
246- echo "Generating V4 Release Package for 4.44.0"
247- NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
248- WKVERSION="4.44.0"
249-
250- # if [[ $BUILD_SOURCEBRANCHNAME = 4\.* ]]
251- # then
252- # echo "Generating V4 Release Package for $BUILD_SOURCEBRANCHNAME"
253- # NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
254- # WKVERSION="$BUILD_SOURCEBRANCHNAME"
255- # elif [[ $BUILD_SOURCEBRANCHNAME = dev ]]
256- # then
257- # echo "Generating V4 Integration Test Package for $BUILD_SOURCEBRANCHNAME"
258- # VERSION=$(cat workers/azure_functions_worker/version.py | tail -1 | cut -d' ' -f3 | sed "s/'//g")
259- # NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
260- # WKVERSION="$VERSION-$(Build.BuildNumber)"
261- # else
262- # # this is only to test nuget related workflow because we are setting nuspec here
263- # echo "Generating Integration Test Package for $BUILD_SOURCEBRANCHNAME for testing purpose"
264- # LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g' | cut -d'.' -f-2)
265- # NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
266- # # Only required for Integration Test. Version number contains date (e.g. 3.1.2.20211028-dev)
267- # WKVERSION="3.$LATEST_TAG-$(BUILD_BUILDID)-TEST"
268- # echo "No Matching Release Tag For $BUILD_SOURCEBRANCH"
269- # fi
246+ if [[ $BUILD_SOURCEBRANCHNAME = 4\.* ]]
247+ then
248+ echo "Generating V4 Release Package for $BUILD_SOURCEBRANCHNAME"
249+ NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
250+ WKVERSION="$BUILD_SOURCEBRANCHNAME"
251+ elif [[ $BUILD_SOURCEBRANCHNAME = dev ]]
252+ then
253+ echo "Generating V4 Integration Test Package for $BUILD_SOURCEBRANCHNAME"
254+ VERSION=$(cat workers/azure_functions_worker/version.py | tail -1 | cut -d' ' -f3 | sed "s/'//g")
255+ NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
256+ WKVERSION="$VERSION-$(Build.BuildNumber)"
257+ else
258+ # this is only to test nuget related workflow because we are setting nuspec here
259+ echo "Generating Integration Test Package for $BUILD_SOURCEBRANCHNAME for testing purpose"
260+ LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g' | cut -d'.' -f-2)
261+ NUSPEC="eng\pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
262+ # Only required for Integration Test. Version number contains date (e.g. 3.1.2.20211028-dev)
263+ WKVERSION="3.$LATEST_TAG-$(BUILD_BUILDID)-TEST"
264+ echo "No Matching Release Tag For $BUILD_SOURCEBRANCH"
265+ fi
270266
271267 echo "##vso[task.setvariable variable=nuspec_path]$NUSPEC"
272268 echo "##vso[task.setvariable variable=worker_version]$WKVERSION"
0 commit comments