Skip to content

Commit

Permalink
fix: use release candidate instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Dec 29, 2024
1 parent ce52bab commit f7afd37
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4

test-pre-commit:
timeout-minutes: 15
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = ["src/deno_systems"]
resolver = "2"

[workspace.package]
version = "0.3.0"
version = "0.3.0-rc.1"
edition = "2021"

[workspace.dependencies]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ghjk

ghjk /gk/ is a programmable runtime manager and an attempt at a successor for [asdf](https://github.com/asdf-vm/asdf).
ghjk /gk/ is a set of tools for managing developer environments and an attempt at a successor for [asdf](https://github.com/asdf-vm/asdf).

> ghjk is part of the
> [Metatype ecosystem](https://github.com/metatypedev/metatype). Consider
Expand Down Expand Up @@ -46,7 +46,7 @@ Before anything, make sure the following programs are available on the system.
Install the ghjk cli using the installer scripts like so:

```bash
curl -fsSL https://raw.github.com/metatypedev/ghjk/v0.3.0/install.sh | bash
curl -fsSL https://raw.github.com/metatypedev/ghjk/v0.3.0-rc.1/install.sh | bash
```

Use the following command to create a starter `ghjk.ts` in your project directory:
Expand All @@ -61,9 +61,9 @@ Ghjk is primarily configured through constructs called "environments" or "envs"
They serve as recipes for making (mostly) reproducible posix shells.

```ts
import { file } from "https://raw.github.com/metatypedev/ghjk/v0.3.0/mod.ts";
import { file } from "https://raw.github.com/metatypedev/ghjk/v0.3.0-rc.1/mod.ts";
// ports are small programs that install sowtware to your envs
import * as ports from "https://raw.github.com/metatypedev/ghjk/v0.3.0/ports/mod.ts";
import * as ports from "https://raw.github.com/metatypedev/ghjk/v0.3.0-rc.1/ports/mod.ts";

const ghjk = file({});

Expand Down
6 changes: 3 additions & 3 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are installer scripts available in the repo.

```bash
# stable
curl -fsSL https://raw.github.com/metatypedev/ghjk/v0.3.0/install.sh | bash
curl -fsSL https://raw.github.com/metatypedev/ghjk/v0.3.0-rc.1/install.sh | bash
```

This will install the CLI and add configuration your shell rc files the necessary hooks ghjk needs to function.
Expand All @@ -39,7 +39,7 @@ Look through the following snippet to understand the basic structure of a `ghjk.
```ts
// import the file function from `mod.ts` using the version of ghjk
// one's using. For example
// https://raw.github.com/metatypedev/ghjk/v0.3.0/
// https://raw.github.com/metatypedev/ghjk/v0.3.0-rc.1/
import { file } from ".../mod.ts";
// import the port for the node program
import node from ".../ports/node.ts";
Expand Down Expand Up @@ -412,7 +412,7 @@ Namely, it's good practice to:

```dockerfile
# sample of how one would install ghjk for use in a Dockerfile
ARG GHJK_VERSION=v0.3.0
ARG GHJK_VERSION=v0.3.0-rc.1
# /usr/bin is available in $PATH by default making ghjk immediately avail
RUN curl -fsSL https://raw.github.com/metatypedev/ghjk/$GHJK_VERSION/install.sh \
| GHJK_INSTALL_EXE_DIR=/usr/bin sh
Expand Down
2 changes: 1 addition & 1 deletion ghjk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ task(
task(
"lock-sed",
async ($) => {
const GHJK_VERSION = "0.3.0";
const GHJK_VERSION = "0.3.0-rc.1";
await sedLock(
$.path(import.meta.dirname!),
{
Expand Down
2 changes: 1 addition & 1 deletion src/ghjk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ghjk"
description = "Programmable runtime manager."
description = "Program your development environments."
version.workspace = true
edition.workspace = true

Expand Down
15 changes: 9 additions & 6 deletions src/ghjk/host/hashfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,13 @@ async fn file_digests(
}

pub async fn file_digest_hash(hcx: &HostCtx, path: &Path) -> Res<Option<String>> {
let path = tokio::fs::canonicalize(path)
.await
.wrap_err("error resolving realpath")?;
let path = match tokio::fs::canonicalize(path).await {
Ok(val) => val,
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
return Ok(None);
}
Err(err) => return Err(err).wrap_err("error resolving realpath"),
};
match tokio::fs::metadata(&path).await {
Ok(stat) => {
let content_hash = if stat.file_type().is_file() || stat.file_type().is_symlink() {
Expand Down Expand Up @@ -194,9 +198,8 @@ async fn file_content_digest_hash(
hcx: &HostCtx,
path: &Path,
) -> Res<SharedFileContentDigestFuture> {
let path = tokio::fs::canonicalize(path)
.await
.wrap_err("error resolving realpath")?;
let path = path.to_owned();

use dashmap::mapref::entry::*;
match hcx.file_hash_memo.entry(path.clone()) {
Entry::Occupied(occupied_entry) => Ok(occupied_entry.get().clone()),
Expand Down

0 comments on commit f7afd37

Please sign in to comment.