remove new release detection/auto-update of version -- future feature
This commit is contained in:
parent
8f563aa4f1
commit
b517dda7b8
@ -19,30 +19,8 @@ PROFILE=$1; shift
|
|||||||
for BUILD in $BUILDS
|
for BUILD in $BUILDS
|
||||||
do
|
do
|
||||||
printf "\n*** %s ***\n\n" "$BUILD"
|
printf "\n*** %s ***\n\n" "$BUILD"
|
||||||
|
|
||||||
BUILD_DIR="profile/$PROFILE/$BUILD"
|
BUILD_DIR="profile/$PROFILE/$BUILD"
|
||||||
|
|
||||||
# get version, release, and arch
|
|
||||||
eval "$(
|
|
||||||
grep -E '"(version|release|arch)"' "$BUILD_DIR/vars.json" | \
|
|
||||||
sed -e 's/[ ",]//g' -e 's/:/=/g'
|
|
||||||
)"
|
|
||||||
|
|
||||||
if [ "$version" != 'edge' ]; then
|
|
||||||
# get current Alpine release for this version
|
|
||||||
alpine_release=$(
|
|
||||||
curl -s "http://dl-cdn.alpinelinux.org/alpine/v$version/main/$arch/" | \
|
|
||||||
grep '"alpine-base-' | cut -d'"' -f2 | cut -d- -f3
|
|
||||||
)
|
|
||||||
# update core version profile's release if necessary
|
|
||||||
if [ "$alpine_release" != "$release" ]; then
|
|
||||||
printf "=== New release (%s) detected! ===\n\n" "$alpine_release"
|
|
||||||
sed -i '' -e "s/$release/$alpine_release/" "../profiles/version/$version"
|
|
||||||
./resolve-profile.py "$PROFILE"
|
|
||||||
# NOTE: this does NOT update 'revision', it's at target profile/build level
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# execute packer, capture output and exit code
|
# execute packer, capture output and exit code
|
||||||
(
|
(
|
||||||
"$PACKER" build -var-file="$BUILD_DIR/vars.json" packer.json
|
"$PACKER" build -var-file="$BUILD_DIR/vars.json" packer.json
|
||||||
|
Loading…
Reference in New Issue
Block a user