30 lines
903 B
Bash
30 lines
903 B
Bash
#!/bin/bash
|
|
#Goto ProjectRoot
|
|
cd "$( cd "$( dirname "$0" )" &> /dev/null && pwd )/.."
|
|
|
|
# Ask for version number
|
|
read -p "Enter the new AlpineLinux version: " AlpineVersion
|
|
|
|
# Confirm the version
|
|
while true; do
|
|
read -p "Update AlpineLinux version in scripts to '$AlpineVersion'. Continue? (yes/no): " yn
|
|
case "$yn" in
|
|
[Yy])
|
|
break
|
|
;;
|
|
[Nn])
|
|
echo "Version not confirmed. Exiting."
|
|
exit 1
|
|
;;
|
|
*)
|
|
echo "Please answer yes or no."
|
|
;;
|
|
esac
|
|
done
|
|
|
|
#Update version in main container defintion (Alpine.yaml)
|
|
sed -i -e "0,/release: \"[^\"]*\"/s//release: \"$AlpineVersion\"/" CT-Build/Alpine.yaml
|
|
|
|
#Update version in the PHP setup/update script(AlpinePHPTool.sh)
|
|
sed -i -e "0,/^SupportedAlpineVersion=/s/^SupportedAlpineVersion=.*/SupportedAlpineVersion=$AlpineVersion/" Scripts/AlpinePHPTool.sh
|