mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-05-31 02:07:41 +00:00
chore: prepare for release
This commit is contained in:
@@ -43,7 +43,7 @@ The most battle-tested open-source video player component for React Native with
|
|||||||
## 📚 Documentation & Examples
|
## 📚 Documentation & Examples
|
||||||
|
|
||||||
- 📖 Documentation - In progress 🏗️, will be available soon
|
- 📖 Documentation - In progress 🏗️, will be available soon
|
||||||
- 📦 [Example: Basic Usage](https://github.com/TheWidlarzGroup/react-native-video-v7/tree/master/example)
|
- 📦 [Example: Basic Usage](https://github.com/TheWidlarzGroup/react-native-video/tree/master/example)
|
||||||
- 📦 [Example: Free DRM Stream](https://www.thewidlarzgroup.com/services/free-drm-token-generator-for-video?utm_source=rnv&utm_medium=readme&utm_id=free-drm)
|
- 📦 [Example: Free DRM Stream](https://www.thewidlarzgroup.com/services/free-drm-token-generator-for-video?utm_source=rnv&utm_medium=readme&utm_id=free-drm)
|
||||||
- 📦 [Example: Offline SDK integration](https://docs.thewidlarzgroup.com/offline-video-sdk)
|
- 📦 [Example: Offline SDK integration](https://docs.thewidlarzgroup.com/offline-video-sdk)
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-native-video",
|
"name": "@react-native-video",
|
||||||
"packageManager": "bun@1.1.42",
|
"packageManager": "bun@1.1.42",
|
||||||
|
"version": "7.0.0-dev.13",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": "https://github.com/TheWidlarzGroup/react-native-video-v7",
|
"repository": "https://github.com/TheWidlarzGroup/react-native-video",
|
||||||
"author": "TheWidlarzGroup <hi@thewidlarzgroup.com> (https://github.com/TheWidlarzGroup)",
|
"author": "TheWidlarzGroup <hi@thewidlarzgroup.com> (https://github.com/TheWidlarzGroup)",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/react-native-video",
|
"packages/react-native-video",
|
||||||
@@ -16,7 +17,9 @@
|
|||||||
"clean": "git clean -xdf",
|
"clean": "git clean -xdf",
|
||||||
"react-native-video": "bun run --cwd packages/react-native-video",
|
"react-native-video": "bun run --cwd packages/react-native-video",
|
||||||
"example": "bun run --cwd example",
|
"example": "bun run --cwd example",
|
||||||
"postinstall": "patch-package --patch-dir example/patches"
|
"postinstall": "patch-package --patch-dir example/patches",
|
||||||
|
"release:github": "release-it --preRelease alpha",
|
||||||
|
"release": "./scripts/release.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.10.0",
|
"@eslint/js": "^9.10.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-video",
|
"name": "react-native-video",
|
||||||
"version": "7.0.0-dev.12",
|
"version": "7.0.0-dev.13",
|
||||||
"description": "<Video /> Component for React Native",
|
"description": "<Video /> Component for React Native",
|
||||||
"source": "./src/index.tsx",
|
"source": "./src/index.tsx",
|
||||||
"main": "./lib/commonjs/index.js",
|
"main": "./lib/commonjs/index.js",
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
"prepare": "bun run build",
|
"prepare": "bun run build",
|
||||||
"build": "bob build",
|
"build": "bob build",
|
||||||
"nitrogen": "nitro-codegen",
|
"nitrogen": "nitro-codegen",
|
||||||
"release": "release-it"
|
"release": "release-it --preRelease alpha --npm.tag=next"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react-native",
|
"react-native",
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/TheWidlarzGroup/react-native-video-v7.git"
|
"url": "git+https://github.com/TheWidlarzGroup/react-native-video.git"
|
||||||
},
|
},
|
||||||
"author": "TheWidlarzGroup <hi@thewidlarzgroup.com> (https://github.com/TheWidlarzGroup)",
|
"author": "TheWidlarzGroup <hi@thewidlarzgroup.com> (https://github.com/TheWidlarzGroup)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -69,8 +69,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/TheWidlarzGroup/react-native-video#readme",
|
"homepage": "https://github.com/TheWidlarzGroup/react-native-video#readme",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"TODO_CHANGE_AFTER_PUBLISHING": "https://registry.npmjs.org/",
|
"registry": "https://registry.npmjs.org/"
|
||||||
"registry": "https://npm.pkg.github.com/"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@expo/config-plugins": "^10.0.2",
|
"@expo/config-plugins": "^10.0.2",
|
||||||
@@ -106,7 +105,7 @@
|
|||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"before:init": "bun typecheck && bun lint",
|
"before:init": "bun typecheck && bun lint",
|
||||||
"after:bump": "bun run build"
|
"after:bump": "bun run build && cp ../../LICENSE ./LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-native-builder-bob": {
|
"react-native-builder-bob": {
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
// Run "npm publish" in cli via Bun
|
|
||||||
import { $ } from 'bun';
|
|
||||||
import path from 'path';
|
|
||||||
import { fileURLToPath } from 'url';
|
|
||||||
|
|
||||||
const args = process.argv.slice(2);
|
|
||||||
|
|
||||||
const noRelease = args.includes("--no-release");
|
|
||||||
|
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
||||||
const rootDir = path.join(__dirname, '..');
|
|
||||||
|
|
||||||
const DRY_RUN = args.includes("--dry-run");
|
|
||||||
|
|
||||||
const bumpVersion = (version) => {
|
|
||||||
const tagParts = version.split('-');
|
|
||||||
const versionParts = tagParts[1].split('.');
|
|
||||||
|
|
||||||
const newVersion = parseInt(versionParts[1]) + 1;
|
|
||||||
|
|
||||||
return `${tagParts[0]}-${versionParts[0]}.${newVersion}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const writeFile = async (path, content) => {
|
|
||||||
if (DRY_RUN) {
|
|
||||||
console.log(`DRY RUN: Would write to ${path}`);
|
|
||||||
console.log(content);
|
|
||||||
console.log('--------------------------------');
|
|
||||||
} else {
|
|
||||||
await Bun.write(path, content);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const runCommand = async (command) => {
|
|
||||||
if (DRY_RUN) {
|
|
||||||
console.log(`DRY RUN: Would run ${command}`);
|
|
||||||
return "";
|
|
||||||
} else {
|
|
||||||
return await $`${command}`.text();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const modifyPackage = async () => {
|
|
||||||
const packageJsonPath = path.join(rootDir, 'packages', 'react-native-video', 'package.json');
|
|
||||||
const packageJson = JSON.parse(await Bun.file(packageJsonPath).text());
|
|
||||||
|
|
||||||
// We need to modify the name of the package name to be exact as @ORGANIZATION/PACKAGE-NAME
|
|
||||||
const name = "@TheWidlarzGroup/react-native-video-v7";
|
|
||||||
const version = packageJson.version;
|
|
||||||
|
|
||||||
const newVersion = bumpVersion(version);
|
|
||||||
|
|
||||||
packageJson.name = name;
|
|
||||||
packageJson.version = newVersion;
|
|
||||||
|
|
||||||
await writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
||||||
};
|
|
||||||
|
|
||||||
let publishCommand = `npm publish --tag dev`;
|
|
||||||
|
|
||||||
await modifyPackage();
|
|
||||||
|
|
||||||
if (!noRelease) {
|
|
||||||
await runCommand(publishCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "[React Native Video] Starting release process"
|
||||||
|
echo "[React Native Video] Options: $@"
|
||||||
|
|
||||||
|
echo "[React Native Video] Checking if we are in the correct directory"
|
||||||
|
if [ ! -d "packages/react-native-video" ]; then
|
||||||
|
echo "[React Native Video] Error: Not in the correct directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[React Native Video] Publishing main package"
|
||||||
|
cd packages/react-native-video
|
||||||
|
bun run release $@
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
echo "[React Native Video] Making Github Release"
|
||||||
|
bun run release:github $@
|
||||||
|
|
||||||
|
echo "[React Native Video] Done"
|
||||||
Reference in New Issue
Block a user