how to use base64 decode?
reslear opened this issue · 1 comments
reslear commented
good afternoon, @mlynch thx for #105 :)
do we have some kind of easy way to decode a base64 string?
for example $GOOGLE_SERVICE_PLIST_RAW
it's more convenient to store in base64, but you have to decode it.
I suggest to do it:
- automatically value -> base64 === value
- or add
from
key with enumbase64
.
platforms:
ios:
targets:
App:
plist:
- file: GoogleService-Info.plist
xml: $GOOGLE_SERVICE_PLIST_RAW
# add `from` attribute
from: base64
nodejs:
const value = Buffer.from(process.env.GOOGLE_SERVICE_PLIST_RAW, 'base64').toString(
'ascii'
)
browser:
const value = atob(process.env.GOOGLE_SERVICE_PLIST_RAW)
reslear commented
also my current solution is:
# prebuid.sh
GOOGLE_SERVICE_PLIST_RAW=$(echo $GOOGLE_SERVICE_PLIST_RAW | base64 -d)
pnpm exec trapeze run trapeze-config.yml -y