Skip to content

Commit 2845e16

Browse files
committed
Merge branch 'lost-commits'
2 parents 99b1644 + f4b0892 commit 2845e16

File tree

7 files changed

+70
-14
lines changed

7 files changed

+70
-14
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Devrcfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@ format:
7272
exec: |
7373
cargo +nightly fmt --all --
7474

75+
update-release-version level="patch":
76+
desc: "Update release version"
77+
run: |
78+
cargo release version --execute {{ level }}
79+
7580

76-
prepare-release level="patch":
81+
update-xtests:
7782
desc: "Prepare next release"
7883
run: |
79-
cargo release version {{ level }}
8084
cargo build
81-
devrc --help > xtests/outputs/test_help_test_1_1_stdout.ansitxt
85+
target/debug/devrc --help > xtests/outputs/test_help_test_1_1_stdout.ansitxt

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ devrc_config:
280280
global: true
281281
interpreter: /bin/bash -c
282282
default: [task_1, task_2]
283+
cache_ttl: 5m
283284
284285
```
285286

@@ -566,7 +567,7 @@ colors: |
566567
More examples can be found [here](https://github.com/devrc-hub/devrc/blob/master/examples/deno_usage.yml).
567568

568569

569-
### Relative path resolving
570+
### Files include and relative path resolving
570571

571572
devrc allows you to load tasks, variables, and environment variables using the import mechanism. Files can be included by specifying an absolute path, URL address, or relative path. In turn, imported devrc files can include other files using relative paths. There are several strategies for resolving relative paths. By default, the strategy is to use the directory of the loaded file as the base path. The connection strategy for a specific file can be specified using the `path_resolve` option.
572573

@@ -608,8 +609,59 @@ include:
608609
5. Then, the `local_2.yml` file will be loaded from the local source `/projects/awesome_project/devrcfiles/local_2.yml`;
609610
6. Finally, the `local_3.yml` file will be loaded from the local source `/projects/awesome_project/local_3.yml`.
610611
612+
#### Authentication
611613
614+
devrc supports using authorization data from the .netrc file to download devrc files that are protected by authorization. For example, from a private repository on GitLab or GitHub.
612615
616+
There are several ways to use authorization:
617+
618+
1. Using bearer token authorization:
619+
620+
```
621+
include:
622+
- url: "https://raw.githubusercontent.com/devrc-hub/devrc/master/examples/remote/entry.yml"
623+
checksum: 1234
624+
auth:
625+
machine: api.github.com
626+
login: api-token
627+
type: bearer
628+
```
629+
630+
When downloading the devrc file, it will send the header `Authorization: Bearer TOKEN-FROM-NET-RC`.
631+
632+
2. Using basic authorization:
633+
634+
```
635+
include:
636+
- url: "https://raw.githubusercontent.com/devrc-hub/devrc/master/examples/remote/entry.yml"
637+
checksum: 1234
638+
auth:
639+
machine: api.github.com
640+
login: username
641+
type: basic
642+
```
643+
644+
When downloading the devrc file, it will send the header `Authorization: Basic base64(username:password)`.
645+
646+
3. Using a header:
647+
648+
```
649+
include:
650+
- url: "https://raw.githubusercontent.com/devrc-hub/devrc/master/examples/remote/entry.yml"
651+
checksum: 1234
652+
auth:
653+
machine: api.github.com
654+
login: api-token
655+
header: "PRIVATE-TOKEN"
656+
657+
```
658+
659+
When downloading the devrc file, it will send the header `PRIVATE-TOKEN: password`.
660+
661+
662+
#### Cache
663+
664+
devrc files from remote sources are cached in the file system. If the cached file lifetime exceeds the time specified in the `devrc_config.cache_ttl` option, the file is downloaded from the remote source.
613665

614666
## Alternatives
615667

cli/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "devrc"
33
edition = "2018"
4-
version = "0.5.4"
4+
version = "0.6.0"
55

66
license = "MIT"
77

@@ -49,8 +49,8 @@ url = "2.3.1"
4949

5050
anyhow = "1.0.62"
5151

52-
devrc-plugins = { path = "../plugins", version = "0.5.4"}
53-
devrc-core = { path = "../core", version = "0.5.4"}
52+
devrc-plugins = { path = "../plugins", version = "0.6.0" }
53+
devrc-core = { path = "../core", version = "0.6.0" }
5454
netrc-rs = "0.1.2"
5555
base64 = "0.21.2"
5656
duration-str = "0.5.1"

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "devrc-core"
33
edition = "2018"
4-
version = "0.5.4"
4+
version = "0.6.0"
55
description = "Core devrc components"
66

77
license = "MIT"

plugins/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "devrc-plugins"
33
edition = "2018"
4-
version = "0.5.4"
4+
version = "0.6.0"
55
description = "Library for creating plugins for devrc"
66

77
license = "MIT"
@@ -23,7 +23,7 @@ log = "0.4.17"
2323
libloading = "0.8.0"
2424
anyhow = "1.0.62"
2525
indexmap = { version="1.9.1", features = ["serde-1"] }
26-
devrc-core = { path = "../core", version = "0.5.4"}
26+
devrc-core = { path = "../core", version = "0.6.0" }
2727

2828

2929
[build-dependencies]

xtests/outputs/test_help_test_1_1_stdout.ansitxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
devrc 0.5.4
1+
devrc 0.6.0
22
⚡ task automation tool on steroids ⚡
33

44
USAGE:

0 commit comments

Comments
 (0)