File tree Expand file tree Collapse file tree 3 files changed +22
-20
lines changed Expand file tree Collapse file tree 3 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 11FROM rust:1.84 as basalt-compilation
22
3- RUN touch /redocly
4- RUN chmod +x /redocly
3+ RUN touch /redocly && chmod +x /redocly
54ENV PATH=/:$PATH
65RUN git clone https://github.com/basalt-rs/basalt-server
76
87WORKDIR /basalt-server
98
10- # TODO: remove
11- RUN git checkout optional-docs
129RUN cargo build --release --no-default-features
1310
1411{% if web_client %}
1512FROM node:22 as web-compilation
1613
1714RUN git clone https://github.com/basalt-rs/basalt /basalt
1815
19- # TODO: Remove
20- WORKDIR /basalt
21- # TODO: Remove
22- RUN git checkout no-ssr
23-
2416WORKDIR /basalt/client
2517RUN npm ci
2618RUN npm run build
@@ -32,8 +24,7 @@ FROM fedora:rawhide as setup
3224WORKDIR /setup
3325
3426COPY install.sh .
35- RUN chmod +x install.sh
36- RUN ./install.sh
27+ RUN chmod +x install.sh && ./install.sh
3728
3829FROM setup as execution
3930
Original file line number Diff line number Diff line change 99
1010port = 8517
1111
12+ # state whether the server should expose a web client
13+ web_client = true
14+
1215[setup ]
1316# import = "./setup.toml"
1417
1518# install = { import = "./install.sh" }
1619install = '''
17- dnf install opam
20+ dnf install opam -y
1821'''
1922
2023# init = { import = "./init.sh" }
Original file line number Diff line number Diff line change @@ -32,23 +32,31 @@ pub async fn handle(path: Option<PathBuf>) -> anyhow::Result<()> {
3232 "basalt" . to_owned ( )
3333 } ;
3434
35- let path = path. map_or ( PathBuf :: from ( & name) , |p| {
36- if p. file_name ( ) . is_some ( ) {
37- p
38- } else {
39- p. with_file_name ( name. clone ( ) ) . with_extension ( "toml" )
40- }
41- } ) ;
35+ let path = path
36+ . map_or ( PathBuf :: from ( & name) , |p| {
37+ if p. file_name ( ) . is_some ( ) {
38+ p
39+ } else {
40+ p. with_file_name ( name. clone ( ) )
41+ }
42+ } )
43+ . with_extension ( "toml" ) ;
4244
4345 let mut ctx = tera:: Context :: new ( ) ;
4446 ctx. insert ( "name" , & name) ;
4547 let content = tmpl
4648 . render ( "template" , & ctx)
4749 . context ( "Failed to render template" ) ?;
4850
49- tokio:: fs:: write ( path, content)
51+ tokio:: fs:: write ( & path, content)
5052 . await
5153 . context ( "Failed to write data" ) ?;
5254
55+ println ! (
56+ "Initialized configuration at path: {}" ,
57+ path. to_str( )
58+ . context( "Created file but failed to generate report" ) ?
59+ ) ;
60+
5361 Ok ( ( ) )
5462}
You can’t perform that action at this time.
0 commit comments