Skip to content

Commit 8f64622

Browse files
committed
f
1 parent ffda2bf commit 8f64622

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

.github/workflows/build_master.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,7 @@ jobs:
105105
f.write(encrypted)
106106
print(f"Encrypted: {len(data)} bytes")
107107
EOF
108-
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
109-
import sys
110-
key = sys.argv[1]
111-
input_file = sys.argv[2]
112-
output_file = sys.argv[3]
113-
114-
with open(input_file, 'rb') as f:
115-
data = f.read()
116-
117-
key_bytes = key.encode('utf-8')
118-
encrypted = bytearray(len(data))
119-
for i in range(len(data)):
120-
encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)]
121-
122-
with open(output_file, 'wb') as f:
123-
f.write(encrypted)
124-
125-
print(f"Encrypted: {len(data)} bytes")
126-
PYTHON_SCRIPT
127-
python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
108+
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
128109
129110
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
130111
cd /tmp/searchindex-repo

.github/workflows/translate_all.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -201,26 +201,7 @@ jobs:
201201
f.write(encrypted)
202202
print(f"Encrypted: {len(data)} bytes")
203203
EOF
204-
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
205-
import sys
206-
key = sys.argv[1]
207-
input_file = sys.argv[2]
208-
output_file = sys.argv[3]
209-
210-
with open(input_file, 'rb') as f:
211-
data = f.read()
212-
213-
key_bytes = key.encode('utf-8')
214-
encrypted = bytearray(len(data))
215-
for i in range(len(data)):
216-
encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)]
217-
218-
with open(output_file, 'wb') as f:
219-
f.write(encrypted)
220-
221-
print(f"Encrypted: {len(data)} bytes")
222-
PYTHON_SCRIPT
223-
python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
204+
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc"
224205
225206
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
226207
cp "${ASSET}.gz.enc" "/tmp/searchindex-repo/${FILENAME}.gz"

0 commit comments

Comments
 (0)