@halilertekin/macos-system-cleaner 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  class MacosSystemCleaner < Formula
2
2
  desc "A collection of scripts to clean RAM, cache and IDEs for improved macOS system performance"
3
3
  homepage "https://github.com/halilertekin/macOS-System-Cleaner"
4
- url "https://github.com/halilertekin/macOS-System-Cleaner/archive/refs/tags/v1.0.0.tar.gz"
4
+ url "https://github.com/halilertekin/macOS-System-Cleaner/archive/refs/tags/v1.1.0.tar.gz"
5
5
  sha256 "REPLACE_WITH_ACTUAL_SHA256" # This will be updated with each new release
6
6
  license "MIT"
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halilertekin/macos-system-cleaner",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A collection of scripts to clean RAM, cache and IDEs for improved macOS system performance",
5
5
  "main": "main_cleaner.sh",
6
6
  "scripts": {
@@ -37,4 +37,4 @@
37
37
  },
38
38
  "homepage": "https://github.com/halilertekin/macOS-System-Cleaner#readme",
39
39
  "preferGlobal": true
40
- }
40
+ }
@@ -0,0 +1,50 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # Configuration
5
+ SOURCE_FORMULA="/Users/halil/macOS-System-Cleaner/macos-system-cleaner.rb"
6
+ TAP_DIR="/Users/halil/homebrew-tap"
7
+ TARGET_FORMULA="$TAP_DIR/Formula/macos-system-cleaner.rb"
8
+
9
+ # Colors
10
+ GREEN='\033[0;32m'
11
+ BLUE='\033[0;34m'
12
+ RED='\033[0;31m'
13
+ NC='\033[0m'
14
+
15
+ echo -e "${BLUE}[INFO]${NC} Starting publication process..."
16
+
17
+ # Check if Tap directory exists
18
+ if [ ! -d "$TAP_DIR" ]; then
19
+ echo -e "${RED}[ERROR]${NC} Tap directory not found at $TAP_DIR"
20
+ exit 1
21
+ fi
22
+
23
+ # Copy formula
24
+ echo -e "${BLUE}[INFO]${NC} Copying formula to Tap..."
25
+ cp "$SOURCE_FORMULA" "$TARGET_FORMULA"
26
+ echo -e "${GREEN}[SUCCESS]${NC} Formula copied."
27
+
28
+ # Git operations
29
+ cd "$TAP_DIR"
30
+ echo -e "${BLUE}[INFO]${NC} Committing changes in $TAP_DIR..."
31
+
32
+ # Check if there are changes
33
+ if git diff --quiet && git diff --staged --quiet && [ -f "$TARGET_FORMULA" ]; then
34
+ # Check if file is untracked
35
+ if [ -z "$(git status --porcelain)" ]; then
36
+ echo -e "${BLUE}[INFO]${NC} No changes to commit."
37
+ exit 0
38
+ fi
39
+ fi
40
+
41
+ git add Formula/macos-system-cleaner.rb
42
+ git commit -m "feat: update macos-system-cleaner to v1.1.0" || echo -e "${BLUE}[INFO]${NC} Nothing to commit or commit failed."
43
+
44
+ echo -e "${BLUE}[INFO]${NC} Pushing to remote..."
45
+ git push origin HEAD
46
+
47
+ echo -e "${GREEN}[SUCCESS]${NC} Successfully published macos-system-cleaner v1.1.0 to your Tap!"
48
+ echo -e "${BLUE}[INFO]${NC} You can now install it using:"
49
+ echo " brew tap halilertekin/tap"
50
+ echo " brew install macos-system-cleaner"
package/release.sh ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env bash
2
+ # -------------------------------------------------
3
+ # Automated release script for macOS-System-Cleaner
4
+ # - Git commit & push
5
+ # - npm version bump (patch)
6
+ # - npm publish (public)
7
+ # - Homebrew formula publish (via publish_release.sh)
8
+ # -------------------------------------------------
9
+
10
+ set -e
11
+
12
+ # ---------- Configuration ----------
13
+ PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ NPM_DIR="$PROJECT_ROOT"
15
+ HOMEBREW_SCRIPT="$PROJECT_ROOT/publish_release.sh"
16
+ GIT_REMOTE="origin"
17
+ GIT_BRANCH="main"
18
+
19
+ # ---------- Git commit (if any) ----------
20
+ cd "$PROJECT_ROOT"
21
+ if [[ -n "$(git status --porcelain)" ]]; then
22
+ echo -e "\e[34m[INFO]\e[0m Staging all changes..."
23
+ git add -A
24
+ echo -e "\e[34m[INFO]\e[0m Creating commit..."
25
+ git commit -m "chore: prepare release"
26
+ else
27
+ echo -e "\e[34m[INFO]\e[0m No local changes to commit."
28
+ fi
29
+
30
+ # ---------- npm version bump ----------
31
+ cd "$NPM_DIR"
32
+ echo -e "\e[34m[INFO]\e[0m Bumping npm version (patch)..."
33
+ npm version patch -m "chore: release v%s"
34
+
35
+ # ---------- npm publish ----------
36
+ echo -e "\e[34m[INFO]\e[0m Publishing to npm (public)..."
37
+ npm publish --access public
38
+
39
+ # ---------- Git tag & push ----------
40
+ NEW_TAG=$(git describe --tags --abbrev=0)
41
+ echo -e "\e[34m[INFO]\e[0m Pushing commit and tag ${NEW_TAG} to ${GIT_REMOTE}/${GIT_BRANCH}..."
42
+ git push "$GIT_REMOTE" "$GIT_BRANCH"
43
+ git push "$GIT_REMOTE" "$NEW_TAG"
44
+
45
+ # ---------- Homebrew publish ----------
46
+ if [[ -x "$HOMEBREW_SCRIPT" ]]; then
47
+ echo -e "\e[34m[INFO]\e[0m Running Homebrew publish script..."
48
+ "$HOMEBREW_SCRIPT"
49
+ else
50
+ echo -e "\e[31m[ERROR]\e[0m publish_release.sh not found or not executable."
51
+ exit 1
52
+ fi
53
+
54
+ echo -e "\e[32m[SUCCESS]\e[0m Release process completed!"
@@ -15,19 +15,19 @@ NC='\033[0m' # Renksiz
15
15
 
16
16
  # Renkli çıktı fonksiyonları
17
17
  print_status() {
18
- echo -e "${BLUE}[INFO]${NC} $1"
18
+ echo -e "${BLUE}[INFO]${NC} $1" >&2
19
19
  }
20
20
 
21
21
  print_success() {
22
- echo -e "${GREEN}[SUCCESS]${NC} $1"
22
+ echo -e "${GREEN}[SUCCESS]${NC} $1" >&2
23
23
  }
24
24
 
25
25
  print_warning() {
26
- echo -e "${YELLOW}[WARNING]${NC} $1"
26
+ echo -e "${YELLOW}[WARNING]${NC} $1" >&2
27
27
  }
28
28
 
29
29
  print_error() {
30
- echo -e "${RED}[ERROR]${NC} $1"
30
+ echo -e "${RED}[ERROR]${NC} $1" >&2
31
31
  }
32
32
 
33
33
  # Yardım menüsü