create flutter packages under the prebuilt folder, fixes #224
This commit is contained in:
parent
b5c7a0c157
commit
626a7fa6d9
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
CURRENT_DIR=$(pwd)
|
CURRENT_DIR=$(pwd)
|
||||||
BASEDIR="${CURRENT_DIR}/../../.."
|
BASEDIR="${CURRENT_DIR}/../../.."
|
||||||
TMPDIR="${BASEDIR}/.tmp"
|
PACKAGES_DIR_MAIN="${BASEDIR}/prebuilt/bundle-flutter-main"
|
||||||
PACKAGES_DIR="${TMPDIR}/flutter_packages"
|
PACKAGES_DIR_LTS="${BASEDIR}/prebuilt/bundle-flutter-lts"
|
||||||
SOURCE_DIR="${BASEDIR}/flutter/flutter"
|
SOURCE_DIR="${BASEDIR}/flutter/flutter"
|
||||||
PACKAGES=(min min-gpl https https-gpl audio video full full-gpl)
|
PACKAGES=(min min-gpl https https-gpl audio video full full-gpl)
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ prepare_inline_sed() {
|
||||||
create_main_releases() {
|
create_main_releases() {
|
||||||
for CURRENT_PACKAGE in "${PACKAGES[@]}"; do
|
for CURRENT_PACKAGE in "${PACKAGES[@]}"; do
|
||||||
local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")"
|
local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")"
|
||||||
local PACKAGE_PATH="${PACKAGES_DIR}/${CURRENT_PACKAGE}"
|
local PACKAGE_PATH="${PACKAGES_DIR_MAIN}/${CURRENT_PACKAGE}"
|
||||||
cp -r ${SOURCE_DIR} ${PACKAGE_PATH}
|
cp -R ${SOURCE_DIR} ${PACKAGE_PATH}
|
||||||
|
|
||||||
# 1. pubspec
|
# 1. pubspec
|
||||||
$SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml
|
$SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml
|
||||||
|
@ -47,14 +47,17 @@ create_main_releases() {
|
||||||
|
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# CREATE DEFAULT PACKAGE
|
||||||
|
cp -R "${SOURCE_DIR}" "${PACKAGES_DIR_MAIN}/default"
|
||||||
|
|
||||||
echo "main releases created!"
|
echo "main releases created!"
|
||||||
}
|
}
|
||||||
|
|
||||||
create_lts_releases() {
|
create_lts_releases() {
|
||||||
for CURRENT_PACKAGE in "${PACKAGES[@]}"; do
|
for CURRENT_PACKAGE in "${PACKAGES[@]}"; do
|
||||||
local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")"
|
local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")"
|
||||||
local PACKAGE_PATH="${PACKAGES_DIR}/${CURRENT_PACKAGE}-lts"
|
local PACKAGE_PATH="${PACKAGES_DIR_LTS}/${CURRENT_PACKAGE}"
|
||||||
cp -r ${SOURCE_DIR} ${PACKAGE_PATH}
|
cp -R ${SOURCE_DIR} ${PACKAGE_PATH}
|
||||||
|
|
||||||
# 1. pubspec
|
# 1. pubspec
|
||||||
$SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml
|
$SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml
|
||||||
|
@ -82,6 +85,17 @@ create_lts_releases() {
|
||||||
|
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# CREATE DEFAULT PACKAGE
|
||||||
|
cp -R "${PACKAGES_DIR_LTS}/https" "${PACKAGES_DIR_LTS}/default"
|
||||||
|
$SED_INLINE "s|name: ffmpeg_kit_flutter_https|name: ffmpeg_kit_flutter|g" ${PACKAGES_DIR_LTS}/default/pubspec.yaml
|
||||||
|
rm -f ${PACKAGES_DIR_LTS}/default/pubspec.yaml.tmp
|
||||||
|
$SED_INLINE "s|ffmpeg_kit_flutter_https|ffmpeg_kit_flutter|g" ${PACKAGES_DIR_LTS}/default/ios/ffmpeg_kit_flutter_https.podspec
|
||||||
|
rm -f ${PACKAGES_DIR_LTS}/default/ios/ffmpeg_kit_flutter_https.podspec.tmp
|
||||||
|
mv ${PACKAGES_DIR_LTS}/default/ios/ffmpeg_kit_flutter_https.podspec ${PACKAGES_DIR_LTS}/default/ios/ffmpeg_kit_flutter.podspec
|
||||||
|
$SED_INLINE "s|ffmpeg_kit_flutter_https|ffmpeg_kit_flutter|g" ${PACKAGES_DIR_LTS}/default/macos/ffmpeg_kit_flutter_https.podspec
|
||||||
|
rm -f ${PACKAGES_DIR_LTS}/default/macos/ffmpeg_kit_flutter_https.podspec.tmp
|
||||||
|
mv ${PACKAGES_DIR_LTS}/default/macos/ffmpeg_kit_flutter_https.podspec ${PACKAGES_DIR_LTS}/default/macos/ffmpeg_kit_flutter.podspec
|
||||||
|
|
||||||
echo "lts releases created!"
|
echo "lts releases created!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,13 +108,13 @@ fi
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
NATIVE_VERSION="$2"
|
NATIVE_VERSION="$2"
|
||||||
|
|
||||||
rm -rf "${PACKAGES_DIR}"
|
rm -rf "${PACKAGES_DIR_MAIN}"
|
||||||
mkdir -p "${PACKAGES_DIR}"
|
mkdir -p "${PACKAGES_DIR_MAIN}"
|
||||||
|
rm -rf "${PACKAGES_DIR_LTS}"
|
||||||
|
mkdir -p "${PACKAGES_DIR_LTS}"
|
||||||
|
|
||||||
prepare_inline_sed
|
prepare_inline_sed
|
||||||
|
|
||||||
create_main_releases;
|
create_main_releases;
|
||||||
|
|
||||||
create_lts_releases;
|
create_lts_releases;
|
||||||
|
|
||||||
cp -r "${BASEDIR}/flutter/flutter_platform_interface" "$PACKAGES_DIR"
|
|
Loading…
Reference in New Issue
Block a user