Skip to content

Commit

Permalink
make lsp and toml-test default features, remove full builds
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj committed Jul 28, 2024
1 parent 3351e6c commit 13ef695
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,11 @@ jobs:
- name: Build taplo
run: |
cargo build --verbose --release --bin taplo --target ${{ matrix.triple }}
Compress-Archive -Path ./target/${{ matrix.triple }}/release/taplo.exe -DestinationPath ./taplo-windows-${{ matrix.platform }}.zip
- name: Build taplo-full
run: |
cargo build --verbose --release --bin taplo --target ${{ matrix.triple }} --features toml-test,lsp
# zip
Compress-Archive -Path ./target/${{ matrix.triple }}/release/taplo.exe -DestinationPath ./taplo-full-windows-${{ matrix.platform }}.zip
Compress-Archive -Path ./target/${{ matrix.triple }}/release/taplo.exe -DestinationPath ./taplo-windows-${{ matrix.platform }}.zip
# gzip
$file = [System.IO.File]::Open('.\target\${{ matrix.triple }}\release\taplo.exe', [System.IO.FileMode]::Open)
$archive = [System.IO.File]::Create('.\taplo-full-windows-${{ matrix.platform }}.gz')
$archive = [System.IO.File]::Create('.\taplo-windows-${{ matrix.platform }}.gz')
$compressor = [System.IO.Compression.GZipStream]::new($archive, [System.IO.Compression.CompressionMode]::Compress)
$file.CopyTo($compressor)
$compressor.Close()
Expand Down Expand Up @@ -375,11 +370,6 @@ jobs:
cargo build --verbose --release --bins --target ${{ matrix.triple }}
gzip -c ./target/${{ matrix.triple }}/release/taplo > ./taplo-darwin-${{ matrix.platform }}.gz
- name: Build taplo-full
run: |
cargo build --verbose --release --bins --target ${{ matrix.triple }} --features toml-test,lsp
gzip -c ./target/${{ matrix.triple }}/release/taplo > ./taplo-full-darwin-${{ matrix.platform }}.gz
- uses: actions/upload-artifact@v4
with:
name: taplo-macos-${{ matrix.platform }}
Expand Down
6 changes: 3 additions & 3 deletions crates/taplo-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ repository = { workspace = true }
rust-version = "1.74"

[features]
default = ["rustls-tls"]
default = ["rustls-tls", "lsp", "toml-test"]
lsp = ["taplo-lsp", "async-ctrlc"]
native-tls = ["taplo-common/native-tls"]
rustls-tls = ["taplo-common/rustls-tls"]
native-tls = ["taplo-common/native-tls", "taplo-lsp?/native-tls"]
rustls-tls = ["taplo-common/rustls-tls", "taplo-lsp?/rustls-tls"]
toml-test = []

[dependencies]
Expand Down
20 changes: 2 additions & 18 deletions site/site/cli/installation/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,16 @@ The default build with commonly-used features.

- [Linux (x86)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86.gz)
- [Linux (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz)
- [Linux (ARMv7)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-armv7.gz)
- [Linux (ARM64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-aarch64.gz)
- [macOS (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-darwin-x86_64.gz)
- [macOS (ARM64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-darwin-aarch64.gz)
- [Windows (x86)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-windows-x86.zip)
- [Windows (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-windows-x86_64.zip)

### Full Build

The full build contains the following additional features:

- Language Server
- An interface for [toml-test](https://github.com/BurntSushi/toml-test)

#### Download

- [Linux (x86)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86.gz)
- [Linux (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz)
- [Linux (ARM64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-aarch64.gz)
- [macOS (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-darwin-x86_64.gz)
- [macOS (ARM64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-darwin-aarch64.gz)
- [Windows (x86)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-windows-x86.zip)
- [Windows (x86_64)](https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-windows-x86_64.zip)

## Example

```bash
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz \
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
```

0 comments on commit 13ef695

Please sign in to comment.