Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into platform-macos-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakiyo committed Feb 17, 2024
2 parents 831281c + 054c6c3 commit d528e56
Show file tree
Hide file tree
Showing 38 changed files with 798 additions and 338 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-bears-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": patch
---

possible fixes to windows path issue
5 changes: 5 additions & 0 deletions .changeset/light-keys-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": minor
---

support manually setting the location of bin directory and fallback to legacy/default path f unspecified
5 changes: 5 additions & 0 deletions .changeset/orange-eyes-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": patch
---

Better logging utilities using `log` and `env_logger`
5 changes: 5 additions & 0 deletions .changeset/shiny-trees-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": patch
---

add progress bar when extrating archive
5 changes: 5 additions & 0 deletions .changeset/sour-donkeys-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": patch
---

Rename colors env to DSM_NO_COLOR
5 changes: 5 additions & 0 deletions .changeset/sour-teachers-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dsm": patch
---

refactor handling of directories
58 changes: 58 additions & 0 deletions .github/workflows/vhs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# name: vhs

# on:
# push:
# paths:
# - tools/demo.tape
# - .github/workflows/vhs.yml

# jobs:
# vhs:
# defaults:
# run:
# shell: bash
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Setup Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable

# - uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# - name: Build dsm
# run: cargo build --release

# - run: ls -A && ls -A target && ls -A target/release

# - name: Add to path
# run: export PATH="target/release/":$PATH

# - uses: charmbracelet/vhs-action@v2

# - name: Run vhs
# shell: bash
# run: |
# export PATH="target/release/":$PATH
# eval "$(dsm env bash)"
# vhs tools/demo.tape

# - uses: stefanzweifel/git-auto-commit-action@v4
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# commit_message: Update generated VHS GIF
# branch: main
# commit_user_name: vhs-action 📼
# commit_user_email: actions@github.com
# commit_author: vhs-action 📼 <actions@github.com>
# file_pattern: '*.gif'
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vscode:
- bungcip.better-toml
- serayuzgur.crates
- rome.rome
- rust-lang.rust-analyzer
120 changes: 118 additions & 2 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = '2021'
license = 'MIT'
repository = 'https://github.com/Yakiyo/dsm'
homepage = 'https://github.com/Yakiyo/dsm'
exclude = ['.devcontainer/**', '.github/**', '.vscode/**', 'tests/**', '.gitignore', 'tools/**', 'site/**']
exclude = ['.devcontainer/**', '.github/**', '.vscode/**', 'tests/**', '.gitignore', 'tools/**', 'site/**', 'pkg/**']

[dependencies]
clap = { version = '3.2.25', features = ['derive', 'env'] }
Expand All @@ -21,6 +21,9 @@ zip = '0.6.5'
serde_json = "1.0.99"
clap_complete = "3.2.5"
home = "0.5.5"
indicatif = "0.17.5"
log = "0.4.19"
env_logger = "0.10.0"

[target.'cfg(windows)'.dependencies]
junction = '1.0.0'
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ eval $(dsm env bash)
# or for zsh
eval $(dsm env zsh)
```
Windows users using Git Bash should check out this issue: https://github.com/Yakiyo/dsm/issues/20

### Fish
Create `~/.config/fish/conf.d/dsm.fish` and add the following.
Expand Down Expand Up @@ -101,6 +102,19 @@ $ dsm ls # or dsm list

For a list of all commands, do `dsm --help`.

## Logs
Dsm logs additional information throughout the program. The level of the emitted logs can be manually customized using the `DSM_LOG` environment variable. The env takes one of the following values:

- error
- warn
- info
- debug
- trace

The default is error. If `info` is set, then all logs of level info, warn and error will be emitted. Similar for the others too. See the docs at [`env_logger`](https://docs.rs/env_logger/0.10.0/env_logger/#enabling-logging) for additional details

Colors can be disabled either via the `--disable-colors` flag or by setting `DSM_LOG_STYLE` env to "never".

## Contributing
Contributions are always welcome. You can start with any of the open [issues](https://github.com/Yakiyo/dsm/issues) to work on. For adding a new feature, please open an issue before working on it in order to discuss it. Feature commits are prefered so please open individual prs for individual features instead of doing several feature additions/changes in a single pull request. For any changes, add a changeset via `pnpm changeset` if its applicable.

Expand Down
22 changes: 22 additions & 0 deletions pkg/scoop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "1.0.1",
"description": "Simplified version manager for the Dart SDK",
"homepage": "https://github.com/Yakiyo/dsm",
"license": "MIT",
"notes": "Don't forget to add \"dsm env powershell | Out-String | Invoke-Expression\" to your powershell profile.",
"architecture": {
"64bit": {
"url": "https://github.com/Yakiyo/dsm/releases/download/v1.0.1/dsm-x86_64-pc-windows-msvc.exe#/dsm.exe",
"hash": "5c101879ed68ee03d9fbd504527eee57e9b562708235ed12f95d2eedc21e6d19"
}
},
"bin": "dsm.exe",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/Yakiyo/dsm/releases/download/v$version/dsm-x86_64-pc-windows-msvc.exe#/dsm.exe"
}
}
}
}
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"author": "Yakiyo <yakiyo1206@gmail.com>",
"license": "MIT",
"scripts": {
"build": "rm -rf public; mkdir public; cp ../tools/install.sh ./public/install.sh.txt; cp ../tools/install.ps1 ./public/install.ps1.txt"
"build": "rm -rf public; mkdir public; cp ../tools/install.sh ./public/install.sh.txt; cp ../tools/install.ps1 ./public/install.ps1.txt; cp ../pkg/scoop.json ./public/scoop.json.txt"
}
}
Loading

0 comments on commit d528e56

Please sign in to comment.