@@ -66,26 +66,36 @@ jobs:
66
66
run : ls -R
67
67
- name : Cleanup and Prepare Formula
68
68
run : |
69
+ # Ensure Formula directory exists
70
+ mkdir -p Formula
71
+
72
+ # Use absolute path and verify directory exists
73
+ FORMULA_DIR="$(pwd)/Formula"
74
+ FORMULA_PATH="${FORMULA_DIR}/skidfuscator.rb"
75
+
76
+ echo "Working directory: $(pwd)"
77
+ echo "Formula directory: ${FORMULA_DIR}"
78
+ echo "Formula path: ${FORMULA_PATH}"
79
+
69
80
# Remove any existing formula files
70
- rm -f ./Formula /skidfuscator*.rb
81
+ rm -f ${FORMULA_DIR} /skidfuscator*.rb
71
82
72
83
# Create the new formula file
73
- FORMULA_PATH="Formula/skidfuscator.rb"
74
- cat <<EOF > "$FORMULA_PATH"
84
+ cat > "${FORMULA_PATH}" << 'EOF'
75
85
class Skidfuscator < Formula
76
86
desc "A JVM-based obfuscation suite designed for Java and Android bytecode"
77
87
homepage "https://github.com/skidfuscatordev/skidfuscator-java-obfuscator"
78
- url "${{ steps.find_asset.outputs.asset_url }} "
79
- sha256 "${{ steps.sha256.outputs.sha256 }} "
80
- version "${{ steps.extract_version.outputs.version }} "
88
+ url "https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/download/2.0.11/skidfuscator.jar "
89
+ sha256 "8d5bc1f6854995495a8451417cf5235a31a56d20fc4ce6079b19963ed84c49d9 "
90
+ version "2.0.11 "
81
91
license "MIT"
82
92
83
93
def install
84
94
libexec.install Dir["*.jar"]
85
95
jar_name = Dir["#{libexec}/*.jar"].first
86
96
(bin/"skidfuscator").write <<~EOS
87
97
#!/usr/bin/env bash
88
- exec java -jar "#{jar_name}" "\ $@"
98
+ exec java -jar "#{jar_name}" "$@"
89
99
EOS
90
100
(bin/"skidfuscator").chmod 0755
91
101
end
@@ -97,20 +107,30 @@ jobs:
97
107
end
98
108
EOF
99
109
110
+ # Verify file was created
111
+ ls -la ${FORMULA_DIR}
112
+
113
+ # Show file contents
114
+ echo "Formula contents:"
115
+ cat "${FORMULA_PATH}"
116
+
100
117
- name : Debug Formula Content
101
118
run : |
102
119
echo "Formula content:"
103
- cat "$FORMULA_PATH "
120
+ cat Formula/skidfuscator.rb || echo "Failed to read formula file "
104
121
echo "Git status:"
105
122
git status
123
+ echo "Directory contents:"
124
+ ls -R
106
125
107
126
- name : Commit and push changes
108
127
run : |
109
128
git config user.name "github-actions"
110
129
git config user.email "[email protected] "
111
- git add ./ Formula/skidfuscator.rb
112
- git commit -m "Update Skidfuscator formula to version ${{ steps.extract_version.outputs.version }} "
130
+ git add Formula/skidfuscator.rb
131
+ git commit -m "Update Skidfuscator formula to version 2.0.11 "
113
132
git push origin HEAD:master
114
133
env :
115
134
GITHUB_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
116
135
136
+
0 commit comments