Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a5f8610
define is dmg running
NickKhalow Sep 29, 2025
2705e47
windows compilation cfg
NickKhalow Sep 29, 2025
a2a2d13
import libc
NickKhalow Sep 30, 2025
bdc6267
use raw ptr
NickKhalow Sep 30, 2025
1a8782d
read where from attr
NickKhalow Sep 30, 2025
f89b10f
resolve disk image path
NickKhalow Sep 30, 2025
b3584eb
solve dependencies
NickKhalow Sep 30, 2025
9ec3fa1
conditional tests
NickKhalow Sep 30, 2025
af7b358
macos tests
NickKhalow Sep 30, 2025
f3bfde0
hooks
NickKhalow Sep 30, 2025
6abd254
tests on pre commit
NickKhalow Sep 30, 2025
7b21837
error descriptions
NickKhalow Sep 30, 2025
6031635
mount path test
NickKhalow Sep 30, 2025
3704eea
abort commit if error
NickKhalow Sep 30, 2025
40de65d
format info
NickKhalow Sep 30, 2025
d4ea1f8
dmg check backing file
NickKhalow Sep 30, 2025
e361748
remove redundant code
NickKhalow Sep 30, 2025
3e4b0ea
use direct array
NickKhalow Sep 30, 2025
1f185c4
use command only on macos
NickKhalow Sep 30, 2025
f49147c
auth token storage
NickKhalow Sep 30, 2025
8f715e4
format
NickKhalow Sep 30, 2025
aa7c730
obtain token on startup
NickKhalow Sep 30, 2025
ec73dff
setup base hooks
NickKhalow Sep 30, 2025
2c54e5e
custom resources for windows
NickKhalow Oct 1, 2025
863cb95
zip 2.5.0 yanked https://crates.io/crates/zip/2.5.0 updating to a clo…
NickKhalow Oct 1, 2025
60d7c77
auth project setup
NickKhalow Oct 1, 2025
9d81c1a
expose auth token;
NickKhalow Oct 1, 2025
8377e8c
update lock
NickKhalow Oct 1, 2025
d338e9e
add new project to bump version script
NickKhalow Oct 1, 2025
b161866
add new project to analyzers
NickKhalow Oct 1, 2025
56bf7ba
change resource directory
NickKhalow Oct 1, 2025
db5bcd1
before build hook
NickKhalow Oct 1, 2025
66ad8f3
update hook
NickKhalow Oct 1, 2025
9b412be
expose logs
NickKhalow Oct 1, 2025
7e0fa12
script read from installer setup
NickKhalow Oct 1, 2025
ebfc68b
update build command
NickKhalow Oct 1, 2025
4176ac7
proper stripping
NickKhalow Oct 1, 2025
3ed00d8
before lsdev command
NickKhalow Oct 1, 2025
2e6f7b5
add missing comma
NickKhalow Oct 1, 2025
5504b9f
update tauri config
NickKhalow Oct 1, 2025
4d950e5
prebuild auto auth
NickKhalow Oct 1, 2025
2de1985
remove NSIS message boxes, proper path args propagation, version prin…
NickKhalow Oct 1, 2025
9a96848
replace json to txt for token files
NickKhalow Oct 1, 2025
57bc8e2
read token
NickKhalow Oct 13, 2025
8133571
integration test for the token from file function
NickKhalow Oct 13, 2025
40f8e70
update background for dmg
NickKhalow Oct 14, 2025
22435f9
remove redundant code
NickKhalow Oct 15, 2025
9d77478
skip update if from dmg
NickKhalow Oct 15, 2025
f4f1770
auto install
NickKhalow Oct 15, 2025
c1bd875
macos cfg
NickKhalow Oct 15, 2025
0522a3f
macos cfg results
NickKhalow Oct 15, 2025
6a04a57
cfg for return
NickKhalow Oct 15, 2025
8eab430
log auto install
NickKhalow Oct 15, 2025
e694662
adding new commands to edit dmg (#174)
charly-bg Oct 15, 2025
9f00d6d
apply format
NickKhalow Oct 15, 2025
7fe46fb
initialization order
NickKhalow Oct 15, 2025
303a104
Merge branch 'main' into feat/auto-auth
NickKhalow Oct 15, 2025
47944bb
tests for token extraction from url
NickKhalow Oct 15, 2025
99025ed
mntfrom -> mnton
NickKhalow Oct 15, 2025
b946ab6
enhance error message
NickKhalow Oct 15, 2025
306068b
remove parent call
NickKhalow Oct 15, 2025
c67cbd9
enhance logging
NickKhalow Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
set -e

echo "Running checks..."

for dir in core src-tauri src-auto-auth; do
echo "Executing $dir"
(
cd "$dir"
echo "Format $dir"
cargo fmt
echo "Check $dir"
cargo check
echo "Clippy $dir"
cargo clippy --all-targets --all-features -- -D warnings
echo "Test $dir"
cargo test
)
done

echo "All checks passed!"
106 changes: 104 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

- name: Import Apple Developer certificate
if: ${{ matrix.os == 'macos-latest' && inputs.dry-run == false }}
if: ${{ matrix.os == 'macos-latest' }}
env:
APPLE_CERTIFICATE: ${{ secrets.MACOS_CSC_LINK }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CSC_KEY_PASSWORD }}
Expand All @@ -159,7 +159,7 @@ jobs:
security find-identity -v -p codesigning build.keychain

- name: Verify Apple certificate
if: ${{ matrix.os == 'macos-latest' && inputs.dry-run == false }}
if: ${{ matrix.os == 'macos-latest' }}
run: |
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
Expand Down Expand Up @@ -200,10 +200,19 @@ jobs:
SIGN_SCRIPT_PATH="${GITHUB_WORKSPACE}/src-tauri/scripts/sign.ps1"
sed -i.bak "s|\"sign.ps1\"|\"${SIGN_SCRIPT_PATH//\\/\/}\"|g" src-tauri/tauri.conf.json

- name: Prebuild AutoAuth
working-directory: ${{ github.workspace }}
if: ${{ matrix.os == 'windows-latest' }}
run: powershell -ExecutionPolicy Bypass -File ./pre-build-auto-auth.ps1

- name: Code Analysis Core
working-directory: ${{ github.workspace }}/core
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Code Analysis AutoAuth
working-directory: ${{ github.workspace }}/src-auto-auth
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Code Analysis Tauri
working-directory: ${{ github.workspace }}/src-tauri
run: cargo clippy --all-targets --all-features -- -D warnings
Expand Down Expand Up @@ -257,6 +266,99 @@ jobs:
args: ${{ secrets.args }}
projectPath: ${{ env.PROJECT_PATH }}

- name: Build & replace custom DMG (macOS)
if: ${{ matrix.os == 'macos-latest' }}
env:
APP_NAME: Decentraland
DMG_BACKGROUND: ${{ github.workspace }}/src-tauri/images/background.png
OUTDIR: src-tauri/target/custom-dmg
CERT_ID: ${{ env.CERT_ID }}
APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PWD }}
APPLE_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
run: |
set -euo pipefail

# --- Resolve .app bundle path ---
APP_PATH=$(
ls -1d src-tauri/target/release/bundle/macos/${APP_NAME}.app 2>/dev/null || \
ls -1d src-tauri/target/universal-apple-darwin/release/bundle/macos/${APP_NAME}.app 2>/dev/null || \
ls -1d src-tauri/target/aarch64-apple-darwin/release/bundle/macos/${APP_NAME}.app 2>/dev/null || \
ls -1d src-tauri/target/x86_64-apple-darwin/release/bundle/macos/${APP_NAME}.app 2>/dev/null
)
echo "APP_PATH=$APP_PATH" | tee -a "$GITHUB_ENV"
[[ -d "$APP_PATH" ]] || { echo "❌ .app not found"; exit 1; }
[[ -f "$DMG_BACKGROUND" ]] || { echo "⚠️ Missing background: $DMG_BACKGROUND"; }

# --- Ensure shell create-dmg is available ---
brew update
brew install create-dmg

# --- Prepare unique staging folder ---
mkdir -p "$OUTDIR"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
STAGE="$OUTDIR/dmg-src-$TIMESTAMP"
mkdir -p "$STAGE"
echo "Using staging folder: $STAGE"

# Copy only the .app into the staging folder
cp -R "$APP_PATH" "$STAGE/${APP_NAME}.app"

# --- Build custom DMG ---
DMG_NAME="${APP_NAME}-custom.dmg"
create-dmg \
--volname "Decentraland Installer" \
--background "$DMG_BACKGROUND" \
--window-pos 200 120 \
--window-size 600 520 \
--icon-size 120 \
--icon "${APP_NAME}.app" 300 230 \
--no-internet-enable \
--format ULFO \
"$OUTDIR/$DMG_NAME" \
"$STAGE"

NEW_DMG_PATH="$OUTDIR/$DMG_NAME"
echo "NEW_DMG_PATH=$NEW_DMG_PATH" | tee -a "$GITHUB_ENV"
[[ -f "$NEW_DMG_PATH" ]] || { echo "❌ Custom DMG not created"; exit 1; }

# --- Codesign + verify ---
codesign --force --sign "$CERT_ID" --timestamp "$NEW_DMG_PATH"
codesign --verify --verbose "$NEW_DMG_PATH"

# --- Notarize + staple ---
xcrun notarytool submit "$NEW_DMG_PATH" \
--apple-id "$APPLE_ID" \
--team-id "$APPLE_TEAM_ID" \
--password "$APPLE_PASSWORD" \
--wait
xcrun stapler staple "$NEW_DMG_PATH"

# --- Replace Tauri DMG with same original filename ---
DMG_DIR=$(
ls -1d src-tauri/target/release/bundle/dmg 2>/dev/null || \
ls -1d src-tauri/target/universal-apple-darwin/release/bundle/dmg 2>/dev/null || \
ls -1d src-tauri/target/aarch64-apple-darwin/release/bundle/dmg 2>/dev/null || \
ls -1d src-tauri/target/x86_64-apple-darwin/release/bundle/dmg 2>/dev/null
)
if [[ ! -d "$DMG_DIR" ]]; then
echo "⚠️ Tauri DMG dir not found; leaving custom DMG at $NEW_DMG_PATH"
exit 1
fi

ORIG_DMG=$(ls -1 "$DMG_DIR"/*.dmg 2>/dev/null | head -n1 || true)
if [[ -z "${ORIG_DMG}" ]]; then
echo "❌ No existing Tauri DMG found in $DMG_DIR to infer original name"; exit 1
fi
ORIG_NAME="$(basename "$ORIG_DMG")"

rm -f "$DMG_DIR"/*.dmg
FINAL_DMG="$DMG_DIR/$ORIG_NAME"
cp "$NEW_DMG_PATH" "$FINAL_DMG"

echo "FINAL_DMG=$FINAL_DMG" | tee -a "$GITHUB_ENV"
echo "✅ Replaced Tauri DMG with custom DMG at $FINAL_DMG (kept original filename)"

- name: Verify Windows signature
if: ${{ matrix.os == 'windows-latest' && inputs.dry-run == false }}
run: |
Expand Down
Loading