-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da60bc2
commit 963c577
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,25 +60,25 @@ jobs: | |
} | ||
# Get current versions with error checks | ||
current_nginx=$(grep -oP '(?<=version:\s)[0-9]+\.[0-9]+\.[0-9]+' src/config.js | grep -m 1 'Nginx') | ||
current_nginx=$(grep -oP '(?<="name":\s*"Nginx",\s*"version":\s*")[0-9]+\.[0-9]+\.[0-9]+' src/config.js) | ||
if [ -z "$current_nginx" ]; then | ||
echo "Error: Nginx version not found in src/config.js" | ||
exit 1 | ||
fi | ||
current_mariadb=$(grep -oP '(?<=version:\s)[0-9]+\.[0-9]+\.[0-9]+' src/config.js | grep -m 1 'MariaDB') | ||
current_mariadb=$(grep -oP '(?<="name":\s*"MariaDB",\s*"version":\s*")[0-9]+\.[0-9]+\.[0-9]+' src/config.js) | ||
if [ -z "$current_mariadb" ]; then | ||
echo "Error: MariaDB version not found in src/config.js" | ||
exit 1 | ||
fi | ||
current_php=$(grep -oP '(?<=version:\s)[0-9]+\.[0-9]+\.[0-9]+' src/config.js | grep -m 1 'PHP') | ||
current_php=$(grep -oP '(?<="name":\s*"PHP",\s*"version":\s*")[0-9]+\.[0-9]+\.[0-9]+' src/config.js) | ||
if [ -z "$current_php" ]; then | ||
echo "Error: PHP version not found in src/config.js" | ||
exit 1 | ||
fi | ||
current_phpmyadmin=$(grep -oP '(?<=version:\s)[0-9]+\.[0-9]+\.[0-9]+' src/config.js | grep -m 1 'phpMyAdmin') | ||
current_phpmyadmin=$(grep -oP '(?<="name":\s*"phpMyAdmin",\s*"version":\s*")[0-9]+\.[0-9]+\.[0-9]+' src/config.js) | ||
if [ -z "$current_phpmyadmin" ]; then | ||
echo "Error: phpMyAdmin version not found in src/config.js" | ||
exit 1 | ||
|
@@ -93,7 +93,7 @@ jobs: | |
pr_title="Bump $service from $current_version to $latest_version" | ||
if [ "$(check_existing_pr "$pr_title")" = "false" ]; then | ||
# Update src/config.js with the new version | ||
sed -i "s/version: '$current_version'/version: '$latest_version'/g" src/config.js | ||
sed -i "s/\"name\": \"$service\", \"version\": \"$current_version\"/\"name\": \"$service\", \"version\": \"$latest_version\"/g" src/config.js | ||
if ! git diff --quiet; then | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
|
@@ -108,7 +108,7 @@ jobs: | |
fi | ||
else | ||
echo "No version update needed for $service" | ||
fi | ||
} | ||
} | ||
create_pr "Nginx" "$current_nginx" "${{ env.latest_nginx }}" | ||
|