Skip to content

Commit 872915e

Browse files
committed
f
1 parent ffd429c commit 872915e

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,36 @@ jobs:
6666
run: ls -R
6767
- name: Cleanup and Prepare Formula
6868
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+
6980
# Remove any existing formula files
70-
rm -f ./Formula/skidfuscator*.rb
81+
rm -f ${FORMULA_DIR}/skidfuscator*.rb
7182
7283
# Create the new formula file
73-
FORMULA_PATH="Formula/skidfuscator.rb"
74-
cat <<EOF > "$FORMULA_PATH"
84+
cat > "${FORMULA_PATH}" << 'EOF'
7585
class Skidfuscator < Formula
7686
desc "A JVM-based obfuscation suite designed for Java and Android bytecode"
7787
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"
8191
license "MIT"
8292
8393
def install
8494
libexec.install Dir["*.jar"]
8595
jar_name = Dir["#{libexec}/*.jar"].first
8696
(bin/"skidfuscator").write <<~EOS
8797
#!/usr/bin/env bash
88-
exec java -jar "#{jar_name}" "\$@"
98+
exec java -jar "#{jar_name}" "$@"
8999
EOS
90100
(bin/"skidfuscator").chmod 0755
91101
end
@@ -97,20 +107,30 @@ jobs:
97107
end
98108
EOF
99109
110+
# Verify file was created
111+
ls -la ${FORMULA_DIR}
112+
113+
# Show file contents
114+
echo "Formula contents:"
115+
cat "${FORMULA_PATH}"
116+
100117
- name: Debug Formula Content
101118
run: |
102119
echo "Formula content:"
103-
cat "$FORMULA_PATH"
120+
cat Formula/skidfuscator.rb || echo "Failed to read formula file"
104121
echo "Git status:"
105122
git status
123+
echo "Directory contents:"
124+
ls -R
106125
107126
- name: Commit and push changes
108127
run: |
109128
git config user.name "github-actions"
110129
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"
113132
git push origin HEAD:master
114133
env:
115134
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
116135

136+

0 commit comments

Comments
 (0)