Skip to content

Commit 2c892ad

Browse files
committed
chore(renovate): adjust post upgrade tasks to allow automatic sha-sum update
A simplification of the checksum script has been made to be compatible with renovate update process and eventually installations without specific binaries (`msg`). Related to #51910
1 parent aa55f95 commit 2c892ad

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

.github/renovate.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
],
2020
postUpgradeTasks: {
21-
commands: ['bash .github/renovate/create_ec2_install_checksum.sh'],
21+
commands: ['bash .github/renovate/post-upgrade.sh'],
2222
fileFilters: [ 'AWS/EC2/ec2-install.sh', ],
2323
executionMode: 'branch',
2424
},
Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
#!/bin/bash
2-
# Create sha256 checksum for the installation script
32

4-
set -Eeuo pipefail
3+
echo "Update sha256 checksum file for AWS script"
54

6-
setup_colors() {
7-
if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then
8-
NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m'
9-
else
10-
NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW=''
11-
fi
12-
}
13-
14-
setup_colors
15-
16-
# Script logic
17-
msg "${YELLOW}Creating checksum${NOFORMAT}"
5+
cd "AWS/EC2"
186
sha256sum ec2-install.sh > ec2-install.sh.sha256

.github/renovate/post-upgrade.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
bash .github/renovate/create_ec2_install_checksum.sh

0 commit comments

Comments
 (0)