This repository was archived by the owner on Sep 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +86
-19
lines changed Expand file tree Collapse file tree 10 files changed +86
-19
lines changed Original file line number Diff line number Diff line change 54
54
55
55
- name : Calculate next semantic-release version
56
56
id : calculate
57
- run : echo "::set-output name= next-version:: $(npx standard-version --dry-run | grep "tagging release" | awk '{ print $NF }')"
57
+ run : echo "next-version= $(npx standard-version --dry-run | grep "tagging release" | awk '{ print $NF }')" >> $GITHUB_OUTPUT
58
58
59
59
# Room for improvement regarding caching/work-skipping. One example here
60
60
# https://github.com/ClementTsang/bottom/blob/92ec3599363c710815c286e975bbb6cc748708dd/.github/workflows/ci.yml#L195
@@ -197,9 +197,29 @@ jobs:
197
197
- name : Combine checksums
198
198
run : cat dist/**/typescript-tools-*-SHASUMS256.txt | tee npm/SHASUMS256.txt
199
199
200
+ - name : Cache cargo
201
+ uses : actions/cache@v3
202
+ id : cache-cargo
203
+ with :
204
+ path : |
205
+ ~/.cargo/bin/
206
+ ~/.cargo/registry/index/
207
+ ~/.cargo/registry/cache/
208
+ ~/.cargo/git/db/
209
+ target/
210
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
211
+
212
+ - name : Install semantic-release-rust
213
+ uses : actions-rs/cargo@v1
214
+ if : steps.cache-cargo.outputs.cache-hit != 'true'
215
+ with :
216
+ command : install
217
+ args : semantic-release-rust --version 1.0.0-alpha.8
218
+
200
219
- name : Invoke semantic-release
201
220
env :
202
221
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
222
+ CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
203
223
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
204
224
run : |
205
225
npm ci --ignore-scripts
Original file line number Diff line number Diff line change 1
1
/.direnv /
2
2
/.pre-commit-config.yaml
3
- /target
3
+ /node_modules /
4
+ /result
5
+ /target /
Original file line number Diff line number Diff line change 59
59
}
60
60
]
61
61
}
62
+ ],
63
+ [
64
+ " @semantic-release/exec" ,
65
+ {
66
+ "verifyContitionsCmd" : " semantic-release-rust verify-conditions" ,
67
+ "prepareCmd" : " semantic-release-rust prepare ${nextRelease.version}" ,
68
+ "publishCmd" : " semantic-release-rust publish"
69
+ }
62
70
]
63
71
]
64
72
}
Original file line number Diff line number Diff line change 2
2
name = " typescript_tools"
3
3
version = " 0.0.0-semantically-released"
4
4
edition = " 2021"
5
+ authors = [" Eric Crosson <eric.s.crosson@utexas.edu>" ]
6
+ license = " ISC"
7
+ description = " Tools for working with TypeScript monorepos"
8
+ readme = " README.md"
9
+ homepage = " https://github.com/typescript-tools/rust-implementation"
10
+ keywords = [" cli" , " typescript" , " monorepo" ]
11
+ categories = [" command-line-utilities" ]
5
12
6
13
[[bin ]]
7
14
name = " monorepo"
8
15
path = " src/main.rs"
9
16
17
+ [lib ]
18
+ name = " typescript_tools"
19
+ path = " src/lib.rs"
20
+
10
21
[dependencies ]
11
22
anyhow = " 1.0.57"
12
23
askama = " 0.11.1"
Original file line number Diff line number Diff line change @@ -3,18 +3,13 @@ from rust:1.65.0@sha256:b0f2a9e48df82f009fda8ae777119e7983104a1b4dc47026653b6cda
3
3
# create a dummy project
4
4
RUN apt-get update && \
5
5
apt-get install --yes musl-tools curl llvm clang && \
6
- rustup target add x86_64-unknown-linux-musl && \
7
- USER=root cargo new --bin rust-implementation
6
+ rustup target add x86_64-unknown-linux-musl
8
7
WORKDIR /rust-implementation
9
8
10
9
# copy over manifests
11
10
COPY ./Cargo.lock ./Cargo.lock
12
11
COPY ./Cargo.toml ./Cargo.toml
13
12
14
- # cache build dependencies
15
- RUN cargo build --release --target x86_64-unknown-linux-musl && \
16
- rm -r src/
17
-
18
13
# copy over project source
19
14
COPY ./templates ./templates
20
15
COPY ./src ./src
Original file line number Diff line number Diff line change 51
51
# doCheck = true;
52
52
buildInputs = with pkgs ; [
53
53
fenix-channel . rustc
54
- fenix-channel . clippy
55
- nodePackages . typescript
56
54
] ;
57
55
58
56
nativeBuildInputs = with pkgs ; [
122
120
fenix-toolchain
123
121
fenix . packages . ${ system } . rust-analyzer
124
122
125
- # Nix
126
123
pkgs . cargo-watch
124
+ pkgs . nodejs
127
125
pkgs . rnix-lsp
128
126
] ;
129
127
Original file line number Diff line number Diff line change 21
21
},
22
22
"devDependencies" : {
23
23
"@codedependant/semantic-release-docker" : " 4.1.0" ,
24
+ "@semantic-release/exec" : " 6.0.3" ,
24
25
"@semantic-release/git" : " 10.0.1" ,
25
26
"@semantic-release/github" : " 8.0.6" ,
26
27
"@semantic-release/npm" : " 9.0.1" ,
31
32
" bin/" ,
32
33
" npm/"
33
34
]
34
- }
35
+ }
Original file line number Diff line number Diff line change 1
1
#![ forbid( unsafe_code) ]
2
2
3
- mod configuration_file;
4
3
mod io;
5
- mod monorepo_manifest;
6
- mod package_manifest;
7
4
mod typescript_config;
8
5
6
+ pub mod configuration_file;
9
7
pub mod link;
10
8
pub mod lint;
11
9
pub mod make_depend;
10
+ pub mod monorepo_manifest;
12
11
pub mod opts;
12
+ pub mod package_manifest;
13
13
pub mod pin;
14
14
pub mod query;
Original file line number Diff line number Diff line change @@ -2,13 +2,10 @@ use std::collections::HashMap;
2
2
use std:: path:: { Path , PathBuf } ;
3
3
4
4
use anyhow:: { Context , Result } ;
5
-
6
5
use globwalk:: { FileType , GlobWalkerBuilder } ;
7
-
8
6
use indoc:: formatdoc;
9
- use serde:: Deserialize ;
10
-
11
7
use pariter:: IteratorExt ;
8
+ use serde:: Deserialize ;
12
9
13
10
use crate :: configuration_file:: ConfigurationFile ;
14
11
use crate :: io:: read_json_from_file;
You can’t perform that action at this time.
0 commit comments