Manager/CI: Add spoofed manager build (#570)
* manager: add script for randomizing pkg name
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
Co-Authored-By: YC酱luyancib <luyancib@qq.com>
* manager: Update randomizer to avoid bug
Revert "manager: Update randomizer to avoid bug"
This reverts commit af9205e70a11db3e3d43bb34de880bbd6b4185b5.
manager: Update randomizer to avoid bug
* mamager: Update randomizer to fix error
fixed
> Task :app:compileReleaseAidl FAILED
ERROR: /home/runner/work/SukiSU-Ultra/SukiSU-Ultra/manager/app/src/main/aidl/org/knifhr/zako/IKsuInterface.aidl:7.1-10: IKsuInterface should be declared in a file called com/sukisu/zako/IKsuInterface.aidl
* manager:clean randomizer
* ci:add spoofed manager build with matrix
* 更新 build-manager.yml
* 更新 build-manager.yml
* fix
* Revert "更新 build-manager.yml"
This reverts commit da80e3f13a.
* ksubot: make MESSAGE_THREAD_ID optional
---------
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
Co-authored-by: rifsxd <rifat.44.azad.rifs@gmail.com>
Co-authored-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>
This commit is contained in:
31
manager/randomizer
Normal file
31
manager/randomizer
Normal file
@@ -0,0 +1,31 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# Generate 3 random lowercase words (6 letters each)
|
||||
word1=$(tr -dc 'a-z' </dev/urandom | head -c6)
|
||||
word2=$(tr -dc 'a-z' </dev/urandom | head -c6)
|
||||
word3=$(tr -dc 'a-z' </dev/urandom | head -c6)
|
||||
word4=$(tr -dc 'a-z' </dev/urandom | head -c6)
|
||||
|
||||
|
||||
# Export variables for use in find -exec
|
||||
export word1 word2 word3 word4
|
||||
|
||||
# Rename directories
|
||||
find . -depth -type d -name 'com' -execdir mv {} "$word1" \;
|
||||
find . -depth -type d -name 'sukisu' -execdir mv {} "$word2" \;
|
||||
find . -depth -type d -name 'ultra' -execdir mv {} "$word3" \;
|
||||
find . -depth -type d -name 'io' -execdir mv {} "$word4" \;
|
||||
|
||||
|
||||
# Replace inside files
|
||||
find . -type f -exec sed -i \
|
||||
-e "s/com\.sukisu\.ultra/$word1.$word2.$word3/g" \
|
||||
-e "s/io\.sukisu\.ultra/$word4.$word2.$word3/g" \
|
||||
-e "s/com\.sukisu\.zako/$word1.$word2.zako/g" \
|
||||
-e "s/com\/sukisu\/ultra/$word1\/$word2\/$word3/g" \
|
||||
-e "s/io\/sukisu\/ultra/$word4\/$word2\/$word3/g" \
|
||||
-e "s/io_sukisu_ultra/${word4}_${word2}_${word3}/g" \
|
||||
-e "s/com_sukisu_ultra/${word1}_${word2}_${word3}/g" {} +
|
||||
|
||||
# add -spoofed on tags
|
||||
sed -i -e '/fun getGitDescribe(): String {/,/^ }/ s/\.trim()$/.trim() + "-spoofed"/' build.gradle.kts
|
||||
Reference in New Issue
Block a user