Skip to content

Commit 0c55d23

Browse files
committed
noop
1 parent 5f75b1e commit 0c55d23

File tree

5 files changed

+42
-28
lines changed

5 files changed

+42
-28
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
tests
2-
.git
32
node_modules

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG BASE_IMAGE=denoland/deno:2.0.1
2+
FROM ${BASE_IMAGE} AS build
3+
WORKDIR /src
4+
5+
RUN apt-get update && \
6+
apt-get install -y git jq && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*
9+
10+
ADD . .
11+
RUN export VERSION=`git -C . -c safe.directory=* describe --tags --always` && \
12+
jq -r ".version|=\"$VERSION\"" bids-validator/deno.json > ._deno.json
13+
14+
WORKDIR /src/bids-validator
15+
RUN deno cache ./bids-validator-deno
16+
RUN ./build.ts
17+
18+
FROM ${BASE_IMAGE} AS base
19+
WORKDIR /src
20+
COPY . .
21+
COPY --from=build /src/._deno.json /src/bids-validator/deno.json
22+
WORKDIR /src/bids-validator
23+
RUN deno cache ./bids-validator-deno
24+
ENTRYPOINT ["./bids-validator-deno"]
25+
26+
FROM ${BASE_IMAGE} AS min
27+
WORKDIR /src
28+
COPY --from=build /src/bids-validator/dist/validator/* .
29+
30+
ENTRYPOINT ["deno", "-A", "./bids-validator.js"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
## Quickstart
2828

29-
This repository currently houses 4 packages:
29+
This repository houses 4 packages:
3030
1. [./bids-validator](./bids-validator)The current deno based bids-validator cli and library
3131
2. [./web](./web)The current web based validator
3232
3. [./legacy/bids-validator](legacy/bids-validator)The legacy node validator

bids-validator/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

bids-validator/src/version.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ export async function getVersion(): Promise<string> {
3333

3434
async function getLocalVersion(path: string): Promise<string> {
3535
// safe.directory setting so we could still operate from another user
36-
const command = new Deno.Command("git", {
37-
args: ['-C', path, '-c', 'safe.directory=*', 'describe', '--tags', '--always'],
38-
})
39-
const { success, stdout } = await command.output();
40-
const description = new TextDecoder().decode(stdout).trim()
41-
return description
36+
try {
37+
const command = new Deno.Command("git", {
38+
args: ['-C', path, '-c', 'safe.directory=*', 'describe', '--tags', '--always'],
39+
})
40+
const { success, stdout } = await command.output();
41+
console.log(success)
42+
const description = new TextDecoder().decode(stdout).trim()
43+
return description
44+
} catch(err) {
45+
return ""
46+
}
4247
}
4348

4449
function getArchiveVersion(): string | undefined {

0 commit comments

Comments
 (0)