Skip to content
Snippets Groups Projects
Commit 1c158df4 authored by Nikolay Panko's avatar Nikolay Panko
Browse files

[*] change link in updtr.sh ; gitlab pipe add manual job for updater build

parent cf0849b4
No related branches found
No related tags found
3 merge requests!1867Bugfix 12422,!1865Bugfix 13205,!1858hotfix-15147
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_UPDATE_FLAGS: --force
......@@ -343,3 +344,4 @@ version:up:
- 'curl -s --request PUT --header "PRIVATE-TOKEN: ${ACCESS_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/variables/$PATCH_NUM_VAR_NAME" --form "key=$PATCH_NUM_VAR_NAME" --form "value=${PATCH_NUM}" || true'
\ No newline at end of file
#! /bin/bash
#! /bin/bash
set -e
STORAGE_URL=https://pub.cellframe.net/linux/cellframe-node/master/updates
#STORAGE_URL=https://pub.cellframe.net/linux/cellframe-node/master/updates
STORAGE_URL=https://internal-pub.cellframe.net/linux/cellframe-node/bugfix-13205
MACHINE=$(uname -m)
......@@ -45,13 +46,22 @@ CURRENT_REBUILD=$(echo $INSTALLED_VERSION | grep -Po "[0-9]([0-9]+)")
echo "Available patch: $MAX_REBUILD | Current patch: $CURRENT_REBUILD"
if (( MAX_REBUILD > CURRENT_REBUILD )); then
echo "Need update cellframe-node to 5.2-$MAX_REBUILD..."
# Determine the full version (e.g. 5.3-354) from AVAILABLE_VERSIONS by the patch we found
for ver in "${AVAILABLE_VERSIONS[@]}"
do
patch=$(echo $ver | cut -d'-' -f2)
if [ "$patch" = "$MAX_REBUILD" ]; then
NEW_VERSION=$ver
break
fi
done
echo "Need update cellframe-node to $NEW_VERSION..."
else
echo "No need to update cellframe-node"
exit 0
fi
PACKAGE_NAME="cellframe-node-5.2-$MAX_REBUILD-updtr-amd64.deb"
PACKAGE_NAME="cellframe-node-$NEW_VERSION-updtr-${POSTFIX}.deb"
echo "wget"
mkdir -p /tmp/cfupd/
wget $STORAGE_URL/$PACKAGE_NAME -O /tmp/cfupd/$PACKAGE_NAME
......@@ -73,4 +83,4 @@ fi
dpkg -i /tmp/cfupd/$PACKAGE_NAME
service cellframe-node restart
\ No newline at end of file
service cellframe-node restart
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment