Skip to content

Commit 475bcc4

Browse files
committed
feat: update ckan-devstaller to v0.3.1
1 parent 0e26320 commit 475bcc4

File tree

21 files changed

+240
-57
lines changed

21 files changed

+240
-57
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Verify ckan-devstaller runs CKAN-only install successfully
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
jobs:
8+
ckanonlyinstall:
9+
name: Run ckan-devstaller with a CKAN-only install
10+
runs-on: ubuntu-22.04
11+
permissions:
12+
# For the git-auto-commit-action
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install Rust stable toolchain
17+
uses: dtolnay/rust-toolchain@stable
18+
- name: Cache cargo deps and target folder
19+
uses: Swatinem/rust-cache@v2
20+
with:
21+
workspaces: ". -> target"
22+
- name: Run ckan-devstaller
23+
run: cargo run --release --verbose -- --ckan-version 2.11.4 --skip-interactive --skip-run

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href="https://ckan-devstaller.dathere.com"><img width="1165" height="668" alt="{1329F0BA-A29F-4BF8-BB6B-E3BA84FDAFCC}" src="https://github.com/user-attachments/assets/8f0cc4ef-d90d-4715-ba21-9083dff0c3ff" /></a>
44

55

6-
`ckan-devstaller` attempts to install a [CKAN](https://ckan.org) instance using [ckan-compose](https://github.com/tino097/ckan-compose) for development usage in a new Ubuntu 22.04 instance.
6+
`ckan-devstaller` attempts to install a [CKAN](https://ckan.org) instance using [ckan-compose](https://github.com/tino097/ckan-compose/tree/ckan-devstaller) for development usage in a new Ubuntu 22.04 instance.
77

88
You may find `ckan-devstaller` useful for:
99

docs/app/(home)/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function Hero() {
118118
</p>
119119
<div className="inline-flex items-center gap-3 max-md:mx-auto mb-8">
120120
<Link
121-
href="/docs"
121+
href="/docs/builder"
122122
className={cn(
123123
buttonVariants({ size: "lg", className: "rounded-full" }),
124124
)}
@@ -139,7 +139,7 @@ function Hero() {
139139
</Link>
140140
</div>
141141
<Cards>
142-
<Card icon={<ZapIcon />} href="/docs" title="Quick start">
142+
<Card icon={<ZapIcon />} href="/docs/builder" title="Quick start">
143143
Get started with ckan-devstaller and install CKAN within minutes
144144
</Card>
145145
<Card icon={<BlocksIcon />} href="/docs/builder" title="Builder">
@@ -312,15 +312,9 @@ function WhyInteractive(props: {
312312
download speed.
313313
</p>
314314
<div className="flex gap-2">
315-
<Link href="/docs" className={cn(buttonVariants(), "not-prose")}>
315+
<Link href="/docs/builder" className={cn(buttonVariants(), "not-prose")}>
316316
Get started
317317
</Link>
318-
<Link
319-
href="/docs/builder"
320-
className={cn(buttonVariants(), "not-prose")}
321-
>
322-
Customize your installation
323-
</Link>
324318
</div>
325319
</WhyPanel>
326320
) : null}

docs/app/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
@import "fumadocs-ui/css/neutral.css";
33
@import "fumadocs-ui/css/ocean.css";
44
@import "fumadocs-ui/css/preset.css";
5-
@import "tw-animate-css";
5+
@import "tw-animate-css";

docs/bun.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"dependencies": {
77
"@radix-ui/react-accordion": "^1.2.12",
88
"@radix-ui/react-collapsible": "^1.1.12",
9+
"@radix-ui/react-label": "^2.1.7",
10+
"@radix-ui/react-switch": "^1.2.6",
911
"@radix-ui/react-tabs": "^1.1.13",
1012
"class-variance-authority": "^0.7.1",
1113
"clsx": "^2.1.1",
@@ -227,6 +229,8 @@
227229

228230
"@radix-ui/react-id": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg=="],
229231

232+
"@radix-ui/react-label": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ=="],
233+
230234
"@radix-ui/react-navigation-menu": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w=="],
231235

232236
"@radix-ui/react-popover": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-controllable-state": "1.2.2", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA=="],
@@ -245,6 +249,8 @@
245249

246250
"@radix-ui/react-slot": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="],
247251

252+
"@radix-ui/react-switch": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ=="],
253+
248254
"@radix-ui/react-tabs": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A=="],
249255

250256
"@radix-ui/react-use-callback-ref": ["@radix-ui/[email protected]", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg=="],

docs/components/builder-sections/ckan-version.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ export default function CKANVersionBuilderSection({ config, setConfig }: any) {
1111
<Cards>
1212
<Card
1313
icon={<SailboatIcon />}
14-
title="2.11.3"
14+
title="2.11.4"
1515
className={
16-
config.ckanVersion === "2.11.3"
16+
config.ckanVersion === "2.11.4"
1717
? selectedCardClasses
1818
: "cursor-pointer"
1919
}
2020
onClick={() => {
21-
setConfig({ ...config, ckanVersion: "2.11.3" });
21+
setConfig({ ...config, ckanVersion: "2.11.4" });
2222
}}
2323
></Card>
2424
<Card
2525
icon={<SailboatIcon />}
26-
title="2.10.8"
26+
title="2.10.9"
2727
className={
28-
config.ckanVersion === "2.10.8"
28+
config.ckanVersion === "2.10.9"
2929
? selectedCardClasses
3030
: "cursor-pointer"
3131
}
3232
onClick={() => {
33-
setConfig({ ...config, ckanVersion: "2.10.8" });
33+
setConfig({ ...config, ckanVersion: "2.10.9" });
3434
}}
3535
></Card>
3636
</Cards>

docs/components/builder-sections/presets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function PresetsBuilderSection({
4949
setConfig({
5050
...config,
5151
preset: "dathere-default",
52-
ckanVersion: "2.11.3",
52+
ckanVersion: "2.11.4",
5353
extensions: ["ckanext-scheming", "DataStore", "DataPusher+"],
5454
features: ["enable-ssh"],
5555
});

docs/components/builder.tsx

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
"use client";
22

33
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
4-
import defaultMdxComponents from "fumadocs-ui/mdx";
5-
import {
6-
BarChartBigIcon,
7-
BlocksIcon,
8-
SailboatIcon,
9-
TerminalSquareIcon,
10-
} from "lucide-react";
4+
import { Label } from "@/components/ui/label"
5+
import { Switch } from "@/components/ui/switch"
116
import { useEffect, useState } from "react";
12-
import PresetsBuilderSection from "./builder-sections/presets";
13-
import CKANVersionBuilderSection from "./builder-sections/ckan-version";
14-
import CKANExtensionsBuilderSection from "./builder-sections/ckan-extensions";
15-
import FeaturesBuilderSection from "./builder-sections/features";
7+
import PresetsBuilderSection from "@/components/builder-sections/presets";
8+
import CKANVersionBuilderSection from "@/components/builder-sections/ckan-version";
9+
import CKANExtensionsBuilderSection from "@/components/builder-sections/ckan-extensions";
10+
import FeaturesBuilderSection from "@/components/builder-sections/features";
1611

1712
export type Config = {
1813
preset: string | undefined;
@@ -25,11 +20,28 @@ export const selectedCardClasses =
2520
"bg-blue-100 dark:bg-blue-950 border-blue-300 dark:border-blue-900 border-2";
2621

2722
export default function Builder() {
28-
const { Card, Cards } = defaultMdxComponents;
23+
const [downloadScript, setDownloadScript] = useState(true);
24+
const downloadScriptString = `#!/usr/bin/env bash
25+
26+
# Update/Upgrade system dependencies
27+
sudo apt update -y
28+
sudo apt upgrade -y
29+
30+
# Install curl
31+
sudo apt install curl -y
32+
33+
# Change to the home directory
34+
cd ~/
35+
36+
# Download the ckan-devstaller binary file
37+
wget https://github.com/dathere/ckan-devstaller/releases/download/0.3.1/ckan-devstaller
38+
39+
# Add execute permission to ckan-devstaller binary file
40+
sudo chmod +x ./ckan-devstaller\n\n# Run ckan-devstaller script\n`;
2941
const [command, setCommand] = useState("./ckan-devstaller");
3042
const [config, setConfig] = useState<Config>({
3143
preset: "ckan-only",
32-
ckanVersion: "2.11.3",
44+
ckanVersion: "2.11.4",
3345
extensions: [],
3446
features: [],
3547
});
@@ -56,8 +68,12 @@ ${ckanVersionString}${extensionsString ? extensionsString : ""}${featuresString
5668
<div className="md:col-span-1 md:border-r-2 md:pr-4">
5769
<div className="sticky top-8">
5870
<h2>ckan-devstaller command</h2>
71+
<div className="flex items-center space-x-2">
72+
<Switch defaultChecked={downloadScript} onCheckedChange={() => setDownloadScript(!downloadScript)} id="download-script" />
73+
<Label htmlFor="download-script">Include download script?</Label>
74+
</div>
5975
<CodeBlock title="Installation command">
60-
<Pre className="text-wrap pl-4 max-w-[21rem]">{command}</Pre>
76+
<Pre className="text-wrap pl-4 max-w-[21rem]">{downloadScript ? downloadScriptString : ""}{command}</Pre>
6177
</CodeBlock>
6278
<h2>Selected configuration</h2>
6379
<div>

docs/components/ui/label.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import * as LabelPrimitive from "@radix-ui/react-label"
5+
import { cva, type VariantProps } from "class-variance-authority"
6+
7+
import { cn } from "@/lib/utils"
8+
9+
const labelVariants = cva(
10+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
11+
)
12+
13+
const Label = React.forwardRef<
14+
React.ElementRef<typeof LabelPrimitive.Root>,
15+
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
16+
VariantProps<typeof labelVariants>
17+
>(({ className, ...props }, ref) => (
18+
<LabelPrimitive.Root
19+
ref={ref}
20+
className={cn(labelVariants(), className)}
21+
{...props}
22+
/>
23+
))
24+
Label.displayName = LabelPrimitive.Root.displayName
25+
26+
export { Label }

docs/components/ui/switch.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import * as SwitchPrimitives from "@radix-ui/react-switch"
5+
6+
import { cn } from "@/lib/utils"
7+
8+
const Switch = React.forwardRef<
9+
React.ElementRef<typeof SwitchPrimitives.Root>,
10+
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
11+
>(({ className, ...props }, ref) => (
12+
<SwitchPrimitives.Root
13+
className={cn(
14+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-green-500 data-[state=unchecked]:bg-gray-500 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-600",
15+
className
16+
)}
17+
{...props}
18+
ref={ref}
19+
>
20+
<SwitchPrimitives.Thumb
21+
className={cn(
22+
"pointer-events-none block h-5 w-5 rounded-full bg-white dark:bg-blue-800 shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
23+
)}
24+
/>
25+
</SwitchPrimitives.Root>
26+
))
27+
Switch.displayName = SwitchPrimitives.Root.displayName
28+
29+
export { Switch }

0 commit comments

Comments
 (0)