mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-10 06:03:50 -05:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98dafb8ba4 | ||
|
|
2addfca1b4 | ||
|
|
e3b05923ae | ||
|
|
aa4195f8d6 | ||
|
|
1b94629c79 | ||
|
|
8cd9cce94e | ||
|
|
ddabd8c102 | ||
|
|
0b0028ab6d | ||
|
|
75509550b1 |
1
.github/actions/build-image/Dockerfile
vendored
1
.github/actions/build-image/Dockerfile
vendored
@@ -5,6 +5,7 @@ ARG TARGETOS
|
|||||||
|
|
||||||
COPY binaries/* /
|
COPY binaries/* /
|
||||||
RUN mv cup-$TARGETOS-$TARGETARCH cup
|
RUN mv cup-$TARGETOS-$TARGETARCH cup
|
||||||
|
RUN chmod +x cup
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=builder /cup /cup
|
COPY --from=builder /cup /cup
|
||||||
|
|||||||
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -355,7 +355,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cup"
|
name = "cup"
|
||||||
version = "3.0.1"
|
version = "3.0.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bollard",
|
"bollard",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -1505,9 +1505,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ring"
|
name = "ring"
|
||||||
version = "0.17.11"
|
version = "0.17.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73"
|
checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cup"
|
name = "cup"
|
||||||
version = "3.0.1"
|
version = "3.0.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
BIN
docs/bun.lockb
BIN
docs/bun.lockb
Binary file not shown.
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build && pagefind --site out --output-path out/_pagefind",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"fmt": "bun prettier --write ."
|
"fmt": "bun prettier --write ."
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"@types/react-dom": "^19.0.3",
|
"@types/react-dom": "^19.0.3",
|
||||||
"eslint": "^9.18.0",
|
"eslint": "^9.18.0",
|
||||||
"eslint-config-next": "15.1.5",
|
"eslint-config-next": "15.1.5",
|
||||||
|
"pagefind": "^1.3.0",
|
||||||
"postcss": "^8.5.1",
|
"postcss": "^8.5.1",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ pub fn split(reference: &str) -> (String, String, String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let splits = repository_and_tag.split(':').collect::<Vec<&str>>();
|
let splits = repository_and_tag.split('@').next().unwrap().split(':').collect::<Vec<&str>>();
|
||||||
let (repository, tag) = match splits.len() {
|
let (repository, tag) = match splits.len() {
|
||||||
1 | 2 => {
|
1 | 2 => {
|
||||||
let repository_components = splits[0].split('/').collect::<Vec<&str>>();
|
let repository_components = splits[0].split('/').collect::<Vec<&str>>();
|
||||||
@@ -38,7 +38,7 @@ pub fn split(reference: &str) -> (String, String, String) {
|
|||||||
};
|
};
|
||||||
(repository, tag)
|
(repository, tag)
|
||||||
}
|
}
|
||||||
_ => unreachable!(),
|
_ => {dbg!(splits); panic!()},
|
||||||
};
|
};
|
||||||
(registry.to_string(), repository, tag.to_string())
|
(registry.to_string(), repository, tag.to_string())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export function CodeBlock({
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const copyText = children instanceof Array ? children.join("") : children;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`}
|
className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`}
|
||||||
@@ -35,7 +37,7 @@ export function CodeBlock({
|
|||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
|
className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
|
||||||
onClick={handleCopy(`docker pull ${children}`)}
|
onClick={handleCopy(`${copyText}`)}
|
||||||
>
|
>
|
||||||
<Clipboard className="size-5" />
|
<Clipboard className="size-5" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ export default function Image({ data }: { data: Image }) {
|
|||||||
>
|
>
|
||||||
<div className="mb-4 flex items-center gap-3">
|
<div className="mb-4 flex items-center gap-3">
|
||||||
<Box className={`size-6 shrink-0 text-${theme}-500`} />
|
<Box className={`size-6 shrink-0 text-${theme}-500`} />
|
||||||
<DialogTitle className="font-mono text-black dark:text-white">
|
<DialogTitle className="font-mono text-black dark:text-white break-all">
|
||||||
{url ? (
|
{url ? (
|
||||||
<>
|
<>
|
||||||
<a
|
<a
|
||||||
href={url}
|
href={url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={`group w-fit text-black hover:underline dark:text-white`}
|
className={`group w-fit hover:underline`}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
{data.reference}
|
{data.reference}
|
||||||
|
|||||||
Reference in New Issue
Block a user