Skip to content

Commit 43e27ac

Browse files
committed
v0.0.1
0 parents  commit 43e27ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+21782
-0
lines changed

.github/workflows/release.yml

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions: read-all
8+
9+
env:
10+
CARGO_INCREMENTAL: 0
11+
12+
jobs:
13+
publish-web:
14+
name: build-release
15+
permissions:
16+
contents: write
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
build: [linux-musl, macos-x86_64, macos-aarch64, win-msvc]
21+
include:
22+
- build: linux-musl
23+
os: ubuntu-20.04
24+
target: x86_64-unknown-linux-musl
25+
- build: macos-x86_64
26+
os: macos-11
27+
target: x86_64-apple-darwin
28+
- build: macos-aarch64
29+
os: macos-14
30+
target: aarch64-apple-darwin
31+
- build: win-msvc
32+
os: windows-2022
33+
target: x86_64-pc-windows-msvc
34+
runs-on: ${{ matrix.os }}
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
38+
# - name: Install packages (Ubuntu)
39+
# if: matrix.os == 'ubuntu-20.04'
40+
# run: |
41+
# sudo apt-get update
42+
# sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools
43+
- name: Install Rust
44+
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
45+
with:
46+
toolchain: stable
47+
target: ${{ matrix.target }}
48+
- name: Build release binary
49+
run: cargo build --target ${{ matrix.target }} --verbose --release -p diffedit3-web
50+
- name: Build archive
51+
shell: bash
52+
run: |
53+
# TODO: Create a third action to combine both in one archive
54+
outdir="target/${{ matrix.target }}/release"
55+
name="diffedit3-web-${{ github.event.release.tag_name }}-${{ matrix.target }}"
56+
cd "$outdir"
57+
ls # Debug
58+
if [ "${{ matrix.os }}" = "windows-2022" ]; then
59+
7z a "../../../$name.zip" diffedit3-web.exe
60+
echo "ASSET=$name.zip" >> $GITHUB_ENV
61+
else
62+
tar czf "../../../$name.tar.gz" diffedit3-web
63+
echo "ASSET=$name.tar.gz" >> $GITHUB_ENV
64+
fi
65+
- name: Upload release archive
66+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ github.event.release.upload_url }}
71+
asset_path: ${{ env.ASSET }}
72+
asset_name: ${{ env.ASSET }}
73+
asset_content_type: application/octet-stream
74+
75+
publish-tauri:
76+
permissions:
77+
contents: write
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
# TODO: Make this more consistent with the other binary
82+
platform: [macos-latest, ubuntu-20.04, windows-latest]
83+
include:
84+
- platform: macos-latest
85+
os: darwin
86+
- platform: ubuntu-20.04
87+
os: linux # TODO: musl?
88+
- platform: windows-latest
89+
os: windows-2022
90+
91+
runs-on: ${{ matrix.platform }}
92+
steps:
93+
- uses: actions/checkout@v4
94+
95+
- name: setup node
96+
uses: actions/setup-node@v4
97+
with:
98+
node-version: 21
99+
100+
- name: install Rust stable
101+
uses: dtolnay/rust-toolchain@stable
102+
103+
- name: install dependencies (ubuntu only)
104+
if: matrix.platform == 'ubuntu-20.04'
105+
run: |
106+
sudo apt-get update
107+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
108+
109+
- name: install frontend dependencies
110+
run: npm install
111+
112+
- uses: ilyagr/tauri-action@patch-1
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
# Will publish a release manually
116+
# with:
117+
# tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
118+
# releaseName: "App v__VERSION__"
119+
# releaseBody: "See the assets to download this version and install."
120+
# releaseDraft: true
121+
# prerelease: false
122+
123+
- name: Build archive
124+
shell: bash
125+
run: |
126+
# TODO: Create a third action to combine both in one archive
127+
outdir="target/release"
128+
name="diffedit3-gui-${{ github.event.release.tag_name }}-${{ matrix.os }}"
129+
cd "$outdir"
130+
ls # Debug
131+
if [ "${{ matrix.os }}" = "windows-2022" ]; then
132+
7z a "../../$name.zip" diffedit3-gui.exe
133+
echo "ASSET=$name.zip" >> $GITHUB_ENV
134+
else
135+
tar czf "../../$name.tar.gz" diffedit3-gui
136+
echo "ASSET=$name.tar.gz" >> $GITHUB_ENV
137+
fi
138+
cd ../..
139+
ls
140+
- name: Upload release archive
141+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
142+
env:
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
with:
145+
upload_url: ${{ github.event.release.upload_url }}
146+
asset_path: ${{ env.ASSET }}
147+
asset_name: ${{ env.ASSET }}
148+
asset_content_type: application/octet-stream

.github/workflows/test.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release
8+
- release-candidate
9+
- ci
10+
pull_request:
11+
12+
permissions: read-all
13+
14+
env:
15+
CARGO_INCREMENTAL: 0
16+
CARGO_PROFILE_DEV_DEBUG: 0
17+
18+
jobs:
19+
check-dist-up-to-date:
20+
name: Check that webapp was compiled
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: setup node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 21
29+
30+
- name: install frontend dependencies
31+
run: npm install
32+
33+
- name: build
34+
run: npm run build
35+
36+
- name: Check for uncommitted changes
37+
shell: bash
38+
# This check might be a bit flaky. If it becomes a problem,
39+
# we could maybe check modification dates instead.
40+
run: |
41+
git add -N . # `git diff` ignores added files without this
42+
# git diff
43+
if git diff --stat --exit-code; then
44+
echo "OK, building the webapp did not cause any changes."
45+
else
46+
echo
47+
echo 'Updates to the webapp were not bundled to webapp/dist/.'
48+
echo 'Please run:'
49+
echo ' rm -r node_modules package-lock.json && npm install && npm run build'
50+
exit 1
51+
fi
52+
clippy:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
57+
- name: Install Rust
58+
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
59+
with:
60+
toolchain: 1.76
61+
components: clippy
62+
- name: install dependencies (ubuntu + Tauri only)
63+
run: |
64+
sudo apt-get update
65+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
66+
- name: Clippy
67+
run: cargo clippy --workspace --all-targets --verbose

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/target/
2+
node_modules/
3+
4+
# Editor directories and files
5+
.vscode/*
6+
!.vscode/extensions.json
7+
.idea
8+
.DS_Store
9+
*.suo
10+
*.ntvs*
11+
*.njsproj
12+
*.sln
13+
*.sw?

AUTHORS

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# diffedit3 is (c) the Jujutsu authors, see also
2+
# https://github.com/martinvonz/jj/blob/main/AUTHORS for the most up-to-date version.
3+
#
4+
# This is the list of Jujutsu's significant contributors.
5+
#
6+
# This does not necessarily list everyone who has contributed code,
7+
# especially since many employees of one corporation may be contributing.
8+
# To see the full list of contributors, see the revision history in
9+
# source control.
10+
Google LLC

0 commit comments

Comments
 (0)