Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ set -e
pushd "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
trap "{ popd; }" EXIT

# renovate: datasource=galaxy-collection depName=arillso.system
ARILLSO_SYSTEM_VERSION="1.0.5"
# renovate: datasource=galaxy-collection depName=arillso.agent
ARILLSO_AGENT_VERSION="1.0.3"
# renovate: datasource=galaxy-collection depName=arillso.container
ARILLSO_CONTAINER_VERSION="1.0.2"
# shellcheck source=versions.env
source versions.env

# Install Ansible Collections
echo "Installing Ansible Collections..."
Expand Down Expand Up @@ -54,3 +50,13 @@ done

# Build Sphinx site
sphinx-build -M html rst build -c . -W --keep-going

# Optimize CSS and JS if postcss is available
if command -v postcss &> /dev/null && [ -f build/html/_static/custom.css ]; then
echo "Optimizing CSS with PostCSS (autoprefixer + cssnano)..."
postcss build/html/_static/custom.css \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

custom.css is not guaranteed to exist — it depends on the Sphinx theme generating it. If the file is absent, postcss will error out and fail the build. Add a guard:

Suggested change
postcss build/html/_static/custom.css \
if command -v postcss &> /dev/null && [ -f build/html/_static/custom.css ]; then

--use autoprefixer --use cssnano \
--no-map \
-o build/html/_static/custom.css
echo "CSS optimization complete."
fi
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"private": true,
"devDependencies": {
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"postcss": "^8.5.3",
"postcss-cli": "^11.0.1"
}
}
13 changes: 13 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no package.json in this PR to track postcss, autoprefixer, and cssnano as dependencies. Without it, contributors have no canonical way to install the right versions, and the versions are effectively unmanaged (and invisible to Renovate). Consider adding a minimal package.json with these as devDependencies.

plugins: [
require("autoprefixer"),
require("cssnano")({
preset: [
"default",
{
discardComments: { removeAll: true },
},
],
}),
],
};
7 changes: 7 additions & 0 deletions versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Collection versions - managed by Renovate
# renovate: datasource=galaxy-collection depName=arillso.system
ARILLSO_SYSTEM_VERSION="1.0.5"
# renovate: datasource=galaxy-collection depName=arillso.agent
ARILLSO_AGENT_VERSION="1.0.3"
# renovate: datasource=galaxy-collection depName=arillso.container
ARILLSO_CONTAINER_VERSION="1.0.2"