Skip to content

Commit

Permalink
chore: revert from trunk-ng to trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Dec 6, 2023
1 parent 450791e commit a6c5b54
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 91 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ on:
push:
branches:
- master
- trunk-ng
pull_request:
branches:
- master
- trunk-ng
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/cache@v3
with:
Expand Down Expand Up @@ -42,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup | Cache Cargo
uses: actions/cache@v3
Expand Down Expand Up @@ -71,15 +69,15 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
binPath: target/debug/trunk-ng
binPath: target/debug/trunk
- os: macos-latest
binPath: target/debug/trunk-ng
binPath: target/debug/trunk
- os: windows-latest
binPath: target/debug/trunk-ng.exe
binPath: target/debug/trunk.exe
runs-on: ${{ matrix.os }}
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup | Cache Cargo
uses: actions/cache@v3
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup | Zola
Expand All @@ -24,9 +24,9 @@ jobs:
&& sudo chmod a+x zola && sudo mv zola /bin/zola
- name: Build
run: cd site && zola build
- name: Upload
uses: actions/upload-pages-artifact@v2
with:
path: ./site/public
- name: Deploy
uses: actions/deploy-pages@v2
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/public
cname: trunkrs.dev
53 changes: 27 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
name: trunk-ng-x86_64-unknown-linux-gnu.tar.gz
name: trunk-x86_64-unknown-linux-gnu.tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
name: trunk-ng-aarch64-unknown-linux-gnu.tar.gz
name: trunk-aarch64-unknown-linux-gnu.tar.gz
cross: "true"
- target: x86_64-apple-darwin
os: macos-12
name: trunk-ng-x86_64-apple-darwin.tar.gz
name: trunk-x86_64-apple-darwin.tar.gz
- target: aarch64-apple-darwin
os: macos-12
xcode: "true"
name: trunk-ng-aarch64-apple-darwin.tar.gz
name: trunk-aarch64-apple-darwin.tar.gz
- target: x86_64-pc-windows-msvc
os: windows-2022
name: trunk-ng-x86_64-pc-windows-msvc.zip
name: trunk-x86_64-pc-windows-msvc.zip
ext: ".exe"

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -121,38 +121,38 @@ jobs:
mkdir -p upload
# if we have an alternate target, there is a sub-directory
if [[ -f "target/release/trunk-ng${{ matrix.ext }}" ]]; then
SRC="target/release/trunk-ng${{ matrix.ext }}"
elif [[ -f "target/${{ matrix.target }}/release/trunk-ng${{ matrix.ext }}" ]]; then
SRC="target/${{ matrix.target }}/release/trunk-ng${{ matrix.ext }}"
if [[ -f "target/release/trunk${{ matrix.ext }}" ]]; then
SRC="target/release/trunk${{ matrix.ext }}"
elif [[ -f "target/${{ matrix.target }}/release/trunk${{ matrix.ext }}" ]]; then
SRC="target/${{ matrix.target }}/release/trunk${{ matrix.ext }}"
else
echo "Unable to find output"
find target
false # stop build
fi
# for upload
cp -pv "${SRC}" upload/trunk-ng${{ matrix.ext }}
cp -pv "${SRC}" upload/trunk${{ matrix.ext }}
- name: Post Build | Strip binary
if: matrix.cross != 'true'
working-directory: upload
run: |
ls -l trunk-ng${{matrix.ext}}
strip trunk-ng${{matrix.ext}}
ls -l trunk-ng${{matrix.ext}}
ls -l trunk${{matrix.ext}}
strip trunk${{matrix.ext}}
ls -l trunk${{matrix.ext}}
- name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest'
working-directory: upload
run: |
7z a ${{ matrix.name }} trunk-ng${{matrix.ext}}
7z a ${{ matrix.name }} trunk${{matrix.ext}}
- name: Post Build | Prepare artifacts [-nix]
if: matrix.os != 'windows-latest'
working-directory: upload
run: |
tar czvf ${{ matrix.name }} trunk-ng${{matrix.ext}}
tar czvf ${{ matrix.name }} trunk${{matrix.ext}}
- name: Post Build | Upload artifacts
uses: actions/upload-artifact@v3
Expand All @@ -174,7 +174,7 @@ jobs:
uses: actions/download-artifact@v3

- name: Setup | Checksums
run: for file in trunk-ng-*/trunk-ng-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
run: for file in trunk-*/trunk-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

- name: Setup | Install convco
run: |
Expand All @@ -197,7 +197,7 @@ jobs:
OPTS="${OPTS} -p"
fi
gh release create ${OPTS} --title "${{ needs.init.outputs.version }}" -F RELEASE_LOG.md ${TAG} \
trunk-ng-*/trunk-ng-*
trunk-*/trunk-*
pages:
needs: release
Expand All @@ -214,12 +214,13 @@ jobs:
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}


# brew:
# needs: release
# runs-on: ubuntu-latest
# steps:
# - uses: mislav/bump-homebrew-formula-action@v2
# with:
# formula-name: trunk
# env:
# COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
brew:
needs: release
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v2
with:
formula-name: trunk
formula-path: Formula/t/trunk.rb
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trunkrs.dev
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ We are all living beings, and what is most important is that we respect each oth
## hacking
Just a few simple items to keep in mind as you hack.

- Pull request early and often. This helps to let others know what you are working on. **Please use Github's Draft PR mechanism** if your PR is not yet ready for review.
- ~~Remember to update the `CHANGELOG.md` once you believe your work is nearing completion.~~
- Pull request early and often. This helps to let others know what you are working on. **Please use GitHub's Draft PR mechanism** if your PR is not yet ready for review.
- Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), a changelog will automatically be created from such commits

## linting
Expand All @@ -21,5 +20,5 @@ We follow [semver](https://semver.org/spec/v2.0.0.html) for versioning this syst
- [ ] ensure CI completes successfully.
- [ ] add a new tag to the repo matching the new `Cargo.toml` `version`. Either via `git tag` or via the Github UI.
- all release tags should start with the letter `v` followed by a semver version.
- [ ] CI is configured for release tags and will create a new Github release, and will upload release artifacts to the release page. Verify that this process has completed successfully.
- [ ] ~~update the new release page with details on the changes made, which should reflect the content of the `CHANGELOG.md`.~~
- [ ] CI is configured for release tags and will create a new GitHub release, and will upload release artifacts to the release page. Verify that this process has completed successfully.

2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "trunk-ng"
name = "trunk"
version = "0.17.16"
edition = "2021"
description = "Build, bundle & ship your Rust WASM application to the web."
Expand All @@ -8,7 +8,7 @@ authors = [
"Anthony Dodd <[email protected]>",
"Jens Reimann <[email protected]>"
]
repository = "https://github.com/ctron/trunk"
repository = "https://github.com/thedodd/trunk"
readme = "README.md"
categories = ["command-line-utilities", "wasm", "web-programming"]
keywords = ["wasm", "bundler", "web", "build-tool", "compiler"]
Expand Down
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
# Trunk NG
# Trunk

[![Build Status](https://github.com/ctron/trunk/actions/workflows/ci.yaml/badge.svg?branch=trunk-ng)](https://github.com/ctron/trunk/actions)
[![](https://img.shields.io/crates/v/trunk-ng.svg?color=brightgreen&style=flat-square)](https://crates.io/crates/trunk-ng)
[![Build Status](https://github.com/thedodd/trunk/actions/workflows/ci.yaml/badge.svg?branch=trunk)](https://github.com/thedodd/trunk/actions)
[![](https://img.shields.io/crates/v/trunk.svg?color=brightgreen&style=flat-square)](https://crates.io/crates/trunk)
![](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue?style=flat-square)
[![Discord Chat](https://img.shields.io/discord/793890238267260958?logo=discord&style=flat-square)](https://discord.gg/JEPdBujTDr)
[![](https://img.shields.io/crates/d/trunk-ng?label=downloads%20%28crates.io%29&style=flat-square)](https://crates.io/crates/trunk-ng)
[![](https://img.shields.io/github/downloads/ctron/trunk/total?label=downloads%20%28GH%29&style=flat-square)](https://github.com/ctron/trunk/releases)
[![](https://img.shields.io/crates/d/trunk?label=downloads%20%28crates.io%29&style=flat-square)](https://crates.io/crates/trunk)
[![](https://img.shields.io/github/downloads/thedodd/trunk/total?label=downloads%20%28GH%29&style=flat-square)](https://github.com/thedodd/trunk/releases)

**Build, bundle & ship your Rust WASM application to the web.**
<br/>
*”Pack your things, we’re going on an adventure!” ~ Ferris*

Trunk is a WASM web application bundler for Rust. Trunk uses a simple, optional-config pattern for building & bundling WASM, JS snippets & other assets (images, css, scss) via a source HTML file.

> [!NOTE]
> This is a forked version of `trunk`, adding features and bug fixes which didn't get merged into trunk so far.
Replace `trunk` with `trunk-ng` for all operations.

**📦 Dev server** - Trunk ships with a built-in server for rapid development workflows, as well as support for HTTP & WebSocket proxies.

**🏗 Change detection** - Trunk watches your application for changes and triggers builds for you, including automatic browser reloading.

## Getting Started

Head on over to the [Trunk-ng website](https://ctron.github.io/trunk/), everything you need is there. A few quick links:
Head on over to the [Trunk website](https://trunkrs.dev), everything you need is there. A few quick links:

- [Install](https://ctron.github.io/trunk/#install)
- Download a released binary: https://github.com/ctron/trunk/releases
- `cargo binstall trunk-ng`
- `cargo install --git https://github.com/ctron/trunk --branch trunk-ng trunk-ng` (most recent from git)
- `cargo install --path . trunk-ng` (Most recent from local directory)
- [App Setup](https://ctron.github.io/trunk/#app-setup)
- [Assets](https://ctron.github.io/trunk//assets/)
- [Configuration](https://ctron.github.io/trunk//configuration/)
- [CLI Commands](https://ctron.github.io/trunk//commands/)
- [Install](https://trunkrs.dev/#install)
- Download a released binary: https://github.com/thedodd/trunk/releases
- `cargo binstall trunk`
- `cargo install --git https://github.com/thedodd/trunk trunk` (most recent from git)
- `cargo install --path . trunk` (Most recent from local directory)
- [App Setup](https://trunkrs.dev//#app-setup)
- [Assets](https://trunkrs.dev/assets/)
- [Configuration](https://trunkrs.dev/configuration/)
- [CLI Commands](https://trunkrs.dev/commands/)

## Examples

Expand All @@ -45,4 +41,4 @@ Anyone and everyone is welcome to contribute! Please review the [CONTRIBUTING.md

### License

trunk-ng is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing.
trunk is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing.
2 changes: 1 addition & 1 deletion examples/yew-tls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An example application demonstrating building a WASM web application using Trunk, Yew & YBC serving with TLS enabled.

Once you've installed Trunk, simply execute `trunk-ng serve --open` from this example's directory, and you
Once you've installed Trunk, simply execute `trunk serve --open` from this example's directory, and you
should see the following web application rendered in your browser. The application will be served using
the self-signed TLS certificates located in `self_signed_certificates` and configured in `Trunk.toml`.

Expand Down
8 changes: 4 additions & 4 deletions site/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
base_url = "https://ctron.github.io/trunk/"
base_url = "https://trunkrs.dev/"

title = "Trunk NG | Build, bundle & ship your Rust WASM application to the web"
title = "Trunk | Build, bundle & ship your Rust WASM application to the web"

compile_sass = true
highlight_code = true
Expand All @@ -12,8 +12,8 @@ theme = "juice"

[extra]
favicon = "rustacean-flat-happy.svg"
juice_logo_name = "Trunk NG"
juice_logo_name = "Trunk"
juice_logo_path = "rustacean-flat-happy.svg"
juice_extra_menu = [
{ title = "Github", link = "https://github.com/ctron/trunk"}
{ title = "Github", link = "https://github.com/thedodd/trunk"}
]
Loading

0 comments on commit a6c5b54

Please sign in to comment.