Skip to content

Commit

Permalink
updated create_release script
Browse files Browse the repository at this point in the history
  • Loading branch information
twihno committed Jul 14, 2021
1 parent 0e6d49d commit 4233dee
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ print_return_value () {
fi
}

# Checking/generating build name
echo -e "\n\e[32m\e[1m*** Checking/generating build name ***\e[0m"

# Get build_name
build_name=$1

if [ -z ${build_name} ]; then
build_name="dev$(date +'%Y-%m-%d-%H:%M')"
echo -e "\nGenerated build_name: $build_name"
echo -e "\n ✅ \e[32m\e[1mGENERATED BUILD NAME\e[0m"
else
echo -e "\nFound build_name: $build_name"
echo -e "\n ✅ \e[32m\e[1mBUILD NAME FOUND\e[0m"
fi

# Create pdf files
echo -e "\n\e[32m\e[1m*** Run build.sh ***\e[0m"
./build.sh
Expand All @@ -25,7 +40,7 @@ print_return_value $?
# Create zip file
echo -e "\n\e[32m\e[1m*** Create zip file ***\e[0m"
cd output
zipname="PrintablePaper_$1.zip"
zipname="PrintablePaper_$build_name.zip"
zipname="${zipname//$'/'/'_'}" # Remove / from zipname
zip -r $zipname *
print_return_value $?
Expand Down

0 comments on commit 4233dee

Please sign in to comment.