Skip to content

Commit

Permalink
Introduce validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwrobel committed Aug 19, 2023
1 parent d192262 commit 3b6f0e0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
31 changes: 20 additions & 11 deletions _auto/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
#!/bin/bash
#!/bin/bash -e

### Update latest information
# See https://github.com/endoflife-date/endoflife.date/pull/2081
git submodule update --remote
# Display context information
echo "Current commit: $(git rev-parse HEAD)"
echo "Ruby version: $(ruby --version)"
echo "Python version: $(python --version)"
echo "Jekyll version: $(bundle exec jekyll --version)"
echo "Deploy URL: $1"

# Update latest product information, see https://github.com/endoflife-date/endoflife.date/pull/2081
pip install -r requirements.txt
# If the latest.py script fails,
# We don't want to raise any errors
# just undo the changes, and carry on
if ! python3 _auto/latest.py ; then
git checkout -- products/
git submodule update --remote
if ! python3 _auto/latest.py ; then # ignore error if the latest.py script fails
git checkout -- products/ # just undo the changes, and carry on
fi

# Replace the Deploy URL with the Preview URL
if [ -n "$1" ]; then
echo "Replacing Deploy URL with Preview URL ($1)"
sed -i "/url\:/curl\: $1" _config.yml
fi

# Finally, do a build
bundle exec jekyll build
# Finally, do a full build
bundle exec jekyll build --trace --verbose
4 changes: 1 addition & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

[context.deploy-preview]
command = """
# Replace the Deploy URL with the Preview URL
sed -i "/url\:/curl\: $DEPLOY_PRIME_URL" _config.yml
./_auto/deploy.sh
./_auto/deploy.sh $DEPLOY_PRIME_URL
"""

[[plugins]]
Expand Down
2 changes: 1 addition & 1 deletion products/alibaba-dragonwell.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ releases:

- releaseCycle: "8"
lts: true
releaseDate: 2019-06-24
releaseDate: abc
eol: 2026-06-30
latest: "8.16.17"
latestReleaseDate: 2023-08-08
Expand Down

0 comments on commit 3b6f0e0

Please sign in to comment.