Skip to content

Commit d8fd4ee

Browse files
committed
fix: software version used before created
1 parent 7d1687e commit d8fd4ee

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

ci.cd/create_aws_lambda_zip.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
apt-get update -y && apt-get install zip -y
44

5+
# github.job
6+
github_branch=${GITHUB_REF##*/}
7+
software_version_trailing=""
8+
main_branch="main"
9+
if [ "$github_branch" = "$main_branch" ];
10+
then
11+
software_version=""
12+
else
13+
software_version_trailing="-${github_branch}-${GITHUB_RUN_ID}"
14+
fi
15+
software_version=`python3 ${project_root_dir}/setup.py --version`
16+
echo "software_version=${software_version}${software_version_trailing}" >> ${GITHUB_ENV}
17+
cat ${GITHUB_ENV}
18+
519
ZIP_NAME='cumulus_lambda_functions_deployment.zip'
620
TERRAFORM_ZIP_NAME='terraform_cumulus_lambda_functions_deployment.zip'
721
TERRAFORM_MARKETPLACE_ZIP_NAME='terraform_marketplace_deployment.zip'
@@ -45,16 +59,4 @@ zip -9 ${terraform_ecr_zip_file} * **/*
4559
cd $project_root_dir/tf-module/stac_browser
4660
zip -9 ${terraform_stac_br_zip_file} * **/*
4761

48-
# github.job
49-
github_branch=${GITHUB_REF##*/}
50-
software_version_trailing=""
51-
main_branch="main"
52-
if [ "$github_branch" = "$main_branch" ];
53-
then
54-
software_version=""
55-
else
56-
software_version_trailing="-${github_branch}-${GITHUB_RUN_ID}"
57-
fi
58-
software_version=`python3 ${project_root_dir}/setup.py --version`
59-
echo "software_version=${software_version}${software_version_trailing}" >> ${GITHUB_ENV}
60-
cat ${GITHUB_ENV}
62+

0 commit comments

Comments
 (0)