mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:39:42 +00:00
adjust update manager test directory structure, and improve release workflow for binary updates
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -47,14 +47,30 @@ jobs:
|
|||||||
|
|
||||||
- name: Commit binaries for release
|
- name: Commit binaries for release
|
||||||
run: |
|
run: |
|
||||||
|
# Configure Git
|
||||||
git config user.name "Tw93"
|
git config user.name "Tw93"
|
||||||
git config user.email "tw93@qq.com"
|
git config user.email "tw93@qq.com"
|
||||||
|
|
||||||
|
# Save binaries to temp location
|
||||||
|
cp bin/analyze-go /tmp/analyze-go
|
||||||
|
cp bin/status-go /tmp/status-go
|
||||||
|
|
||||||
|
# Switch to main branch
|
||||||
|
git fetch origin main
|
||||||
|
git checkout main
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
# Restore binaries
|
||||||
|
mv /tmp/analyze-go bin/analyze-go
|
||||||
|
mv /tmp/status-go bin/status-go
|
||||||
|
|
||||||
|
# Commit and Push
|
||||||
git add bin/analyze-go bin/status-go
|
git add bin/analyze-go bin/status-go
|
||||||
if git diff --staged --quiet; then
|
if git diff --staged --quiet; then
|
||||||
echo "No changes to commit"
|
echo "No changes to commit"
|
||||||
else
|
else
|
||||||
git commit -m "chore: update binaries for ${GITHUB_REF#refs/tags/}"
|
git commit -m "chore: update binaries for ${GITHUB_REF#refs/tags/}"
|
||||||
git push origin HEAD:main
|
git push origin main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update-formula:
|
update-formula:
|
||||||
|
|||||||
2
mole
2
mole
@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "$SCRIPT_DIR/lib/core/common.sh"
|
source "$SCRIPT_DIR/lib/core/common.sh"
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.12.15"
|
VERSION="1.12.16"
|
||||||
MOLE_TAGLINE="can dig deep to clean your Mac."
|
MOLE_TAGLINE="can dig deep to clean your Mac."
|
||||||
|
|
||||||
# Check if Touch ID is already configured
|
# Check if Touch ID is already configured
|
||||||
|
|||||||
@@ -115,13 +115,13 @@ BREW_CASK_OUTDATED_COUNT=0
|
|||||||
MOLE_UPDATE_AVAILABLE=true
|
MOLE_UPDATE_AVAILABLE=true
|
||||||
|
|
||||||
FAKE_DIR="$HOME/fake-script-dir"
|
FAKE_DIR="$HOME/fake-script-dir"
|
||||||
mkdir -p "$FAKE_DIR"
|
mkdir -p "$FAKE_DIR/lib/manage"
|
||||||
cat > "$FAKE_DIR/mole" <<'SCRIPT'
|
cat > "$FAKE_DIR/mole" <<'SCRIPT'
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
echo "Already on latest version"
|
echo "Already on latest version"
|
||||||
SCRIPT
|
SCRIPT
|
||||||
chmod +x "$FAKE_DIR/mole"
|
chmod +x "$FAKE_DIR/mole"
|
||||||
SCRIPT_DIR="$FAKE_DIR"
|
SCRIPT_DIR="$FAKE_DIR/lib/manage"
|
||||||
|
|
||||||
brew_has_outdated() { return 0; }
|
brew_has_outdated() { return 0; }
|
||||||
start_inline_spinner() { :; }
|
start_inline_spinner() { :; }
|
||||||
|
|||||||
Reference in New Issue
Block a user