Closed GantMan closed 6 years ago
One tricky thing is trying to find the Android SDK etc. If android is > 25 the location of the version moves. This will make snapshotting to make the rule a little more complicated.
Some hypothetical code for testing...
// android? // if > 25? cat $ANDROID_HOME/platform-tools/source.properties | grep Pkg.Revision // const androidVersion = await system.run(`$ANDROID_HOME/tools/bin/sdkmanager --list | grep 'build-tools;#{ANDROID_SDK}' | tail -1 | awk '{print $3}'`) // else? // cat $ANDROID_HOME/tools/source.properties | grep Pkg.Revision const androidSDKVersion = await runTrim(`$ANDROID_HOME/tools/android list sdk | grep 'SDK Tools' | tail -1 | awk '{print $6}'`)
Parsable version available on <= 24
upgrading to 25 to see what detections work well there.
Move this logic over to envinfo.
One tricky thing is trying to find the Android SDK etc. If android is > 25 the location of the version moves. This will make snapshotting to make the rule a little more complicated.
Some hypothetical code for testing...