Skip to content

Commit

Permalink
Merge remote-tracking branch 'sigoden/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoop committed Dec 5, 2023
2 parents 0792132 + 0cec573 commit 51c58fb
Show file tree
Hide file tree
Showing 23 changed files with 1,852 additions and 1,207 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,12 @@ jobs:
RUSTFLAGS: --deny warnings

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
with:
components: clippy, rustfmt
override: true
toolchain: stable
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Test
run: cargo test --all
Expand Down
106 changes: 55 additions & 51 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- target: aarch64-pc-windows-msvc
os: windows-latest
use-cross: true
cargo-flags: "--no-default-features"
cargo-flags: ""
- target: x86_64-apple-darwin
os: macos-latest
cargo-flags: ""
Expand Down Expand Up @@ -71,31 +71,43 @@ jobs:
use-cross: true
cargo-flags: "--no-default-features"
runs-on: ${{matrix.os}}
env:
BUILD_CMD: cargo

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Check Tag
id: check-tag
shell: bash
run: |
tag=${GITHUB_REF##*/}
echo "::set-output name=version::$tag"
if [[ "$tag" =~ v[0-9]+.[0-9]+.[0-9]+-jkoop-[0-9]+$ ]]; then
echo "::set-output name=rc::false"
ver=${GITHUB_REF##*/}
echo "version=$ver" >> $GITHUB_OUTPUT
if [[ "$ver" =~ v[0-9]+.[0-9]+.[0-9]+-jkoop-[0-9]+$ ]]; then
echo "rc=false" >> $GITHUB_OUTPUT
else
echo "::set-output name=rc::true"
echo "rc=true" >> $GITHUB_OUTPUT
fi
- name: Install Rust Toolchain Components
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
override: true
target: ${{ matrix.target }}
toolchain: stable
profile: minimal # minimal component installation (ie, no documentation)

targets: ${{ matrix.target }}
# Since rust 1.72, mips platforms are tier 3
toolchain: 1.71

- name: Install cross
if: matrix.use-cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Overwrite build command env variable
if: matrix.use-cross
shell: bash
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV

- name: Show Version Information (Rust, cargo, GCC)
shell: bash
run: |
Expand All @@ -105,13 +117,10 @@ jobs:
rustup default
cargo -V
rustc -V
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: build
args: --locked --release --target=${{ matrix.target }} ${{ matrix.cargo-flags }}
shell: bash
run: $BUILD_CMD build --locked --release --target=${{ matrix.target }} ${{ matrix.cargo-flags }}

- name: Build Archive
shell: bash
Expand All @@ -123,31 +132,30 @@ jobs:
set -euxo pipefail
bin=${GITHUB_REPOSITORY##*/}
src=`pwd`
dist=$src/dist
dist_dir=`pwd`/dist
name=$bin-$version-$target
executable=target/$target/release/$bin
if [[ "$RUNNER_OS" == "Windows" ]]; then
executable=$executable.exe
fi
mkdir $dist
cp $executable $dist
cd $dist
mkdir $dist_dir
cp $executable $dist_dir
cd $dist_dir
if [[ "$RUNNER_OS" == "Windows" ]]; then
archive=$dist/$name.zip
archive=$dist_dir/$name.zip
7z a $archive *
echo "::set-output name=archive::`pwd -W`/$name.zip"
echo "archive=dist/$name.zip" >> $GITHUB_OUTPUT
else
archive=$dist/$name.tar.gz
tar czf $archive *
echo "::set-output name=archive::$archive"
archive=$dist_dir/$name.tar.gz
tar -czf $archive *
echo "archive=dist/$name.tar.gz" >> $GITHUB_OUTPUT
fi
- name: Publish Archive
uses: softprops/action-gh-release@v0.1.5
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
draft: false
Expand All @@ -163,16 +171,16 @@ jobs:
needs: release
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
build-args: |
REPO=${{ github.repository }}
Expand All @@ -184,20 +192,16 @@ jobs:
linux/arm/v7
push: ${{ needs.release.outputs.rc == 'false' }}
tags: ${{ github.repository }}:latest, ${{ github.repository }}:${{ github.ref_name }}

# publish-crate:
# name: Publish to crates.io
# if: ${{ needs.release.outputs.rc == 'false' }}
# runs-on: ubuntu-latest
# needs: release
# steps:
# - uses: actions/checkout@v2
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# - name: Publish

# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
# run: cargo publish

# publish-crate:
# name: Publish to crates.io
# if: ${{ needs.release.outputs.rc == 'false' }}
# runs-on: ubuntu-latest
# needs: release
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - name: Publish
# env:
# CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
# run: cargo publish
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,72 @@

All notable changes to this project will be documented in this file.

## [0.38.0] - 2023-11-28

### Bug Fixes

- Unable to start if config file omit bind/port fields ([#294](https://github.com/sigoden/dufs/issues/294))

### Features

- Password can contain `:` `@` `|` ([#297](https://github.com/sigoden/dufs/issues/297))
- Deprecate the use of `|` to separate auth rules ([#298](https://github.com/sigoden/dufs/issues/298))
- More flexible config values ([#299](https://github.com/sigoden/dufs/issues/299))
- Ui supports view file ([#301](https://github.com/sigoden/dufs/issues/301))

### Refactor

- Take improvements from the edge browser ([#289](https://github.com/sigoden/dufs/issues/289))
- Ui change the cursor for upload-btn to a pointer ([#291](https://github.com/sigoden/dufs/issues/291))
- Ui improve uploading progress ([#296](https://github.com/sigoden/dufs/issues/296))

## [0.37.1] - 2023-11-08

### Bug Fixes

- Use DUFS_CONFIG to specify the config file path ([#286](https://github.com/sigoden/dufs/issues/286)

## [0.37.0] - 2023-11-08

### Bug Fixes

- Sort path ignore case ([#264](https://github.com/sigoden/dufs/issues/264))
- Ui show user-name next to the user-icon ([#278](https://github.com/sigoden/dufs/issues/278))
- Auto delete half-uploaded files ([#280](https://github.com/sigoden/dufs/issues/280))

### Features

- Deprecate `--auth-method`, as both options are available ([#279](https://github.com/sigoden/dufs/issues/279))
- Support config file with `--config` option ([#281](https://github.com/sigoden/dufs/issues/281))
- Support hashed password ([#283](https://github.com/sigoden/dufs/issues/283))

### Refactor

- Remove one clone on `assets_prefix` ([#270](https://github.com/sigoden/dufs/issues/270))
- Optimize tests
- Improve code quanity ([#282](https://github.com/sigoden/dufs/issues/282))

## [0.36.0] - 2023-08-24

### Bug Fixes

- Ui readonly if no write perm ([#258](https://github.com/sigoden/dufs/issues/258))

### Testing

- Remove dependency on native tls ([#255](https://github.com/sigoden/dufs/issues/255))

## [0.35.0] - 2023-08-14

### Bug Fixes

- Search should ignore entry path ([#235](https://github.com/sigoden/dufs/issues/235))
- Typo __ASSERTS_PREFIX__ ([#252](https://github.com/sigoden/dufs/issues/252))

### Features

- Sort by type first, then sort by name/mtime/size ([#241](https://github.com/sigoden/dufs/issues/241))

## [0.34.2] - 2023-06-05

### Bug Fixes
Expand Down
Loading

0 comments on commit 51c58fb

Please sign in to comment.