Update clojure runtimes.

This commit is contained in:
Oliver 2026-10-16 16:06:41 +01:00
parent 994b67b4f2
commit c564dbaa29
6 changed files with 203 additions and 84 deletions

View File

@ -15,10 +15,12 @@ steps:
path: /drone/cache/
commands:
- ls -la /drone/cache/.m2
- clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository"}' -P -M:blog:clojure-demos:dev:shadow-cljs-run
- clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -P -M:blog:clojure-demos:dev:shadow-cljs-run:poly
# --- Blog ---
- name: build-blog
# Detect which bases changed since the last release tag (v[0-9]*).
# Deployables here are bases (not projects), so we use changed-bases; a change
# to a shared component or to any file outside bases/ affects every base.
- name: detect-changes
pull: always
image: clojure:tools-deps
depends_on:
@ -28,81 +30,121 @@ steps:
- name: cache
path: /drone/cache/
commands:
- clj -M:blog:shadow-cljs-run release blog
- |
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:poly ws get:changes:changed-bases since:release out:changed-bases.json
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:poly ws get:changes:changed-components since:release out:changed-components.json
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:poly ws get:changes:changed-files since:release out:changed-files.json
sed -e 's/\[//g' -e 's/\]//g' -e 's/[" ]//g' -e 's/,/\n/g' changed-bases.json > changed-bases.txt
sed -e 's/\[//g' -e 's/\]//g' -e 's/[" ]//g' -e 's/,/\n/g' changed-components.json > changed-components.txt
sed -e 's/\[//g' -e 's/\]//g' -e 's/[" ]//g' -e 's/,/\n/g' changed-files.json > changed-files.txt
if [ -s changed-components.txt ] || grep -v '^bases/' changed-files.txt | grep -q .; then
echo all > changed-bases.txt
fi
echo "changed bases: $(tr '\n' ' ' < changed-bases.txt)"
- name: deploy-blog
pull: True
image: appleboy/drone-scp
depends_on:
- build-blog
settings:
host: blog.digitaloctave.com
port: 22
username:
from_secret: ssh_user
key:
from_secret: ssh_key
target: /var/www/new-blog/
source: /drone/src/bases/do-blog/resources/public/*
strip_components: 6
# --- Clojure Demos ---
- name: build-clojure-demos
- name: build-and-deploy-blog
pull: always
image: clojure:tools-deps
depends_on:
- fetch-clojure-deps
- fetch-npm-deps
- detect-changes
volumes:
- name: cache
path: /drone/cache/
commands:
- clj -M:clojure-demos:shadow-cljs-run release clojure-demos
- name: deploy-clojure-demos
pull: True
image: appleboy/drone-scp
depends_on:
- build-clojure-demos
settings:
host: clojure-demos.digitaloctave.com
port: 22
username:
environment:
SSH_USER:
from_secret: ssh_user
key:
SSH_KEY:
from_secret: ssh_key
target: /var/www/clojure-demos/
source: /drone/src/bases/clojure-demos/resources/public/*
strip_components: 6
commands:
- |
if grep -qx 'all' changed-bases.txt || grep -qx 'do-blog' changed-bases.txt; then
echo "Building do-blog"
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:blog:shadow-cljs-run release blog
echo "Deploying do-blog"
command -v scp >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null; }
mkdir -p ~/.ssh && printf '%s\n' "$SSH_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r bases/do-blog/resources/public/* "$SSH_USER@blog.digitaloctave.com:/var/www/new-blog/"
else
echo "No changes affecting do-blog, skipping build and deploy"
fi
# --- Portfolio ---
- name: build-portfolio
- name: build-and-deploy-clojure-demos
pull: always
image: clojure:tools-deps
depends_on:
- fetch-clojure-deps
- fetch-npm-deps
- build-and-deploy-blog
volumes:
- name: cache
path: /drone/cache/
commands:
- clj -M:dev:shadow-cljs-run release ui
- name: deploy-portfolio
pull: True
image: appleboy/drone-scp
depends_on:
- build-portfolio
settings:
host: digitaloctave.com
port: 22
username:
environment:
SSH_USER:
from_secret: ssh_user
key:
SSH_KEY:
from_secret: ssh_key
target: /var/www/portfolio/
source: /drone/src/development/resources/public/*
strip_components: 5
commands:
- |
if grep -qx 'all' changed-bases.txt || grep -qx 'clojure-demos' changed-bases.txt; then
echo "Building clojure-demos"
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:clojure-demos:shadow-cljs-run release clojure-demos
echo "Deploying clojure-demos"
command -v scp >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null; }
mkdir -p ~/.ssh && printf '%s\n' "$SSH_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r bases/clojure-demos/resources/public/* "$SSH_USER@clojure-demos.digitaloctave.com:/var/www/clojure-demos/"
else
echo "No changes affecting clojure-demos, skipping build and deploy"
fi
- name: build-and-deploy-portfolio
pull: always
image: clojure:tools-deps
depends_on:
- build-and-deploy-clojure-demos
volumes:
- name: cache
path: /drone/cache/
environment:
SSH_USER:
from_secret: ssh_user
SSH_KEY:
from_secret: ssh_key
commands:
- |
if grep -qx 'all' changed-bases.txt || grep -qx 'portfolio' changed-bases.txt; then
echo "Building portfolio"
clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:dev:shadow-cljs-run release ui
echo "Deploying portfolio"
command -v scp >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null; }
mkdir -p ~/.ssh && printf '%s\n' "$SSH_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no -r development/resources/public/* "$SSH_USER@digitaloctave.com:/var/www/portfolio/"
else
echo "No changes affecting portfolio, skipping build and deploy"
fi
# Tag a new release so the next build only builds changes since this tag.
# Only runs on push events (never on the tag event it creates, avoiding a loop).
- name: tag-release
pull: always
image: clojure:tools-deps
depends_on:
- build-and-deploy-portfolio
when:
event: [push]
commands:
- |
if [ ! -s changed-bases.txt ]; then
echo "Nothing changed, skipping release tag"
exit 0
fi
git config user.email "ci@drone.local"
git config user.name "Drone CI"
if [ -n "$DRONE_NETRC_MACHINE" ]; then
printf 'machine %s login %s password %s\n' "$DRONE_NETRC_MACHINE" "$DRONE_NETRC_USERNAME" "$DRONE_NETRC_PASSWORD" > ~/.netrc
chmod 600 ~/.netrc
fi
VERSION=$(( $(git tag -l 'v[0-9]*' | wc -l) + 1 ))
echo "Tagging release v$VERSION"
git tag -a "v$VERSION" -m "[skip ci] Release v$VERSION"
git push origin "v$VERSION"
volumes:
- name: cache

View File

@ -271,7 +271,42 @@
(defn grouped-lists-page [data]
[articles
(ui/grouped-articles-list {:title "Clojure on the JVM"
:groups
[{:title "Clojure on the JVM"
:articles [{:title "Clojure"
:description "The original language running on the jvm with access to the java eco system"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojure-basics"}
{:title "Clojurescript"
:description "Clojure running in the browser or on top of node, with access to the js eco system."
:icon-image "https://clojurescript.org/images/cljs-logo-60b.png"
:page "clojurescript-basics"}
{:title "ClojureCLR"
:description "Clojure running on microsofts CLR with access to .net ecosystem"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojureclr-basics"}
{:title "ClojureDart"
:description "Clojure for dart, use clojure to build apps using flutter"
:page "clojuredart-info"}]}
{:title "Clojure for GO Lang"
:articles [ {:title "Let GO"
:description "Clojure for go, use clojure to build apps using go runtime"
:page "clojureletgo-info"}]}
{:title "Clojure for python"
:articles [ {:title "Let GO"
:description "Clojure for go, use clojure to build apps using go runtime"
:page "clojureletgo-info"}]}
{:title "Clojure native"
:articles [ {:title "Ferret"
:description "Clojure for go, use clojure to build apps using go runtime"
:page "clojureletgo-info"}]}
]}
)
#_[articles
{:title (-> data :title)
:body (-> data :intro)
:articles

View File

@ -1,6 +1,22 @@
(ns com.oly.static-sites.clojure-demos.routes
(:require [spec-tools.data-spec :as ds]))
{:title "Clojure Demos"
:groups [{:title "Dialects & Interop"
:articles [{:title "Clojure"
:description "The original language running on the jvm with access to the java eco system"
:img-src "https://clojure.org/images/clojure-logo-120b.png"}
{:title "Clojurescript"
:description "Clojure running in the browser or on top of node, with access to the js eco system."
:img-src "https://clojurescript.org/images/cljs-logo-60b.png"}]}
{:title "DSL's"
:articles [{:title "Hiccup HTML Demo"
:description "Hiccup is a DSL for generating HTML it uses data structures over strings to generate html"
:icon-image "https://miro.medium.com/max/1400/1*CEYFj5R57UFyCXts2nsBqA.png"}
{:title "Honey SQL Demo"
:description "Similar to honey but for SQL allows you to split apart your complex queries into parts and compose them together."
:icon-image "https://miro.medium.com/max/1400/1*CEYFj5R57UFyCXts2nsBqA.png"}]}]}
;; put constant data here
(def site-data
@ -10,26 +26,27 @@
:pages {:dialects {:title "Dialects & Interop"
:intro "Clojure has the ability to run on multiple technology stacks, this allows code reuse and consistency regardless of which eco system you want to make use of."
:key :dialects
:demos [{:title "Clojure"
:description "The original language running on the jvm with access to the java eco system"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojure-basics"}
{:title "Clojurescript"
:description "Clojure running in the browser or on top of node, with access to the js eco system."
:icon-image "https://clojurescript.org/images/cljs-logo-60b.png"
:page "clojurescript-basics"}
{:title "ClojureCLR"
:description "Clojure running on microsofts CLR with access to .net ecosystem"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojureclr-basics"}
{:title "ClojureDart"
:description "Clojure for dart, use clojure to build apps using flutter"
:page "clojuredart-info"}
{:title "LetGO"
:description "Clojure for go, use clojure to build apps using go runtime"
:page "clojureletgo-info"}
:demos [{:title "CLojure"
:articles [{:title "Clojure"
:description "The original language running on the jvm with access to the java eco system"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojure-basics"}
{:title "Clojurescript"
:description "Clojure running in the browser or on top of node, with access to the js eco system."
:icon-image "https://clojurescript.org/images/cljs-logo-60b.png"
:page "clojurescript-basics"}
{:title "ClojureCLR"
:description "Clojure running on microsofts CLR with access to .net ecosystem"
:icon-image "https://clojure.org/images/clojure-logo-120b.png"
:page "clojureclr-basics"}
{:title "ClojureDart"
:description "Clojure for dart, use clojure to build apps using flutter"
:page "clojuredart-info"}
{:title "Let GO"
:description "Clojure for go, use clojure to build apps using go runtime"
:page "clojureletgo-info"}
]
]}]
}
:dsl {:title "DSL's"
@ -125,7 +142,7 @@
["/dialects/"
{:name :dialects
:view :list}]
:view :grouped-lists}]
["/examples/"
{:name :examples

View File

@ -0,0 +1,24 @@
#+TITLE: Chocolate melt pudding
#+DATE: 2025-10-31 12:00:00 UTC
#+HTML_DOCTYPE: <!DOCTYPE html>
#+DESCRIPTION: puddings
#+FILETAGS: recipe:puddings
#+CATEGORY: recipe
#+SLUG: chocolate-melt-pudding
* Info
Serves 4
* Ingredients
- 110g (4 oz) pudding rice
- 25g (1 oz) granulated sugar
- 25g (1 oz) margarine or butter
- 12L (2 pt) milk
- ground cinnamon, nutmeg or vanilla extract (optional)
* Instructions
1. Use some of the butter to grease the bowl of the slow cooker.
2. Add milk, rice, sugar and remaining butter and either ground cinnamon, nutmeg or vanilla extract.
3. Give the contents a stir and replace the lid.
4. Turn the slow cooker onto high and cook for 3-4 hours or until the rice as absorbed the liquid.
5. Stir around halfway through.

View File

@ -15,8 +15,9 @@
thheller/shadow-cljs {:mvn/version "3.3.6"}
;;refactor-nrepl/refactor-nrepl {:mvn/version "3.9.0"}
;;cider/cider-nrepl {:mvn/version "0.43.1"}
no.cjohansen/portfolio {:mvn/version "2026.03.1"}
djblue/portal {:mvn/version "0.48.0"}}}
no.cjohansen/portfolio {:mvn/version "2026.03.1"}
reagent/reagent {:mvn/version "1.1.1"}
djblue/portal {:mvn/version "0.48.0"}}}
:blog {:extra-paths ["components/ui-hiccup/src"
"components/ui-tachyon/src"

View File

@ -52,7 +52,7 @@
:clojure-demos {:output-dir "bases/clojure-demos/resources/public/js"
;:asset-path "."
:target :browser
:compiler-options {:infer-externs :auto :output-feature-set :es6 :externs ["datascript/externs.js"]
:compiler-options {:infer-externs :auto :output-feature-set :es2018 :externs ["datascript/externs.js"]
:warnings {:undeclared-var false}}
:modules {:base {:entries []}
:app {:init-fn com.oly.static-sites.clojure-demos.core/startup!