代码拉取完成,页面将自动刷新
同步操作将从 杨玉/flutter_ijkplayer_source 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
set -e
VERSION_CODE=800800
VERSION_NAME=0.8.8
VERSION_TARGET=$1
do_version_readme() {
# README.md
# cat README.md \
# | sed "s/\(#compile 'tv.danmaku.ijk.media:ijkplayer-java:#\)[[:digit:]][[:digit:].]*\(#'#\)/\1:$VERSION_NAME\2/" \
# > README.md.new
cat README.md \
| sed "s/\(compile \'tv.danmaku.ijk.media:ijkplayer-[[:alnum:]_]*:\)[[:digit:].]*[[:digit:]]/\1$VERSION_NAME/g" \
| sed "s/\(git checkout -B latest k\)[[:digit:]][[:digit:].]*/\1$VERSION_NAME/g" \
> README.md.new
mv -f README.md.new README.md
}
do_version_gradle() {
# android/ijkplayer/build.gradle
cat android/ijkplayer/build.gradle \
| sed "s/\(versionCode[[:space:]]*=[[:space:]]*\)[[:digit:]][[:digit:]]*/\1$VERSION_CODE/" \
| sed "s/\(versionName[[:space:]]*=[[:space:]]*\)\"[[:digit:].]*[[:digit:]]\"/\1\"$VERSION_NAME\"/" \
> android/ijkplayer/build.gradle.new
mv -f android/ijkplayer/build.gradle.new android/ijkplayer/build.gradle
# android/ijkplayer/gradle.properties
cat android/ijkplayer/gradle.properties \
| sed "s/\(VERSION_NAME=\)[[:digit:].]*[[:digit:]]/\1$VERSION_NAME/" \
| sed "s/\(VERSION_CODE=\)[[:digit:]][[:digit:]]*/\1$VERSION_CODE/" \
> android/ijkplayer/gradle.properties.new
mv -f android/ijkplayer/gradle.properties.new android/ijkplayer/gradle.properties
# android/ijkplayer/ijkplayer-exo/build.gradle
cat android/ijkplayer/ijkplayer-exo/build.gradle \
| sed "s/\(compile \'tv.danmaku.ijk.media:ijkplayer-[-_[:alpha:][:digit:]]*:\)[[:digit:].]*[[:digit:]]/\1$VERSION_NAME/g" \
> android/ijkplayer/ijkplayer-exo/build.gradle.new
mv -f android/ijkplayer/ijkplayer-exo/build.gradle.new android/ijkplayer/ijkplayer-exo/build.gradle
# android/ijkplayer/ijkplayer-example/build.gradle
cat android/ijkplayer/ijkplayer-example/build.gradle \
| sed "s/\(ompile \'tv.danmaku.ijk.media:ijkplayer-[-_[:alpha:][:digit:]]*:\)[[:digit:].]*[[:digit:]]/\1$VERSION_NAME/g" \
> android/ijkplayer/ijkplayer-example/build.gradle.new
mv -f android/ijkplayer/ijkplayer-example/build.gradle.new android/ijkplayer/ijkplayer-example/build.gradle
}
do_version_xcode() {
# ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
cat ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj \
| sed "s/\(CURRENT_PROJECT_VERSION = \).*;/\1$VERSION_NAME;/g" \
> ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj.new
mv -f ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj.new ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
}
if [ "$VERSION_TARGET" = "readme" ]; then
do_version_readme
elif [ "$VERSION_TARGET" = "gradle" ]; then
do_version_gradle
elif [ "$VERSION_TARGET" = "show" ]; then
echo $VERSION_NAME
elif [ "$VERSION_TARGET" = "xcode" ]; then
do_version_xcode
else
do_version_readme
do_version_gradle
do_version_xcode
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。