Skip to content

Commit

Permalink
version: 发版 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohappy committed Dec 17, 2024
1 parent 2541315 commit f5ea513
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 16 deletions.
49 changes: 49 additions & 0 deletions scripts/update-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const path = require('path')
const fs = require('fs')
const argv = require('yargs').argv

const files = {
audioresample: path.resolve(__dirname, '../src/audioresample/package.json'),
audiostretchpitch: path.resolve(__dirname, '../src/audiostretchpitch/package.json'),
avcodec: path.resolve(__dirname, '../src/avcodec/package.json'),
avfilter: path.resolve(__dirname, '../src/avfilter/package.json'),
avformat: path.resolve(__dirname, '../src/avformat/package.json'),
avnetwork: path.resolve(__dirname, '../src/avnetwork/package.json'),
avpipeline: path.resolve(__dirname, '../src/avpipeline/package.json'),
avplayer: path.resolve(__dirname, '../src/avplayer/package.json'),
avprotocol: path.resolve(__dirname, '../src/avprotocol/package.json'),
avrender: path.resolve(__dirname, '../src/avrender/package.json'),
avtranscoder: path.resolve(__dirname, '../src/avtranscoder/package.json'),
avutil: path.resolve(__dirname, '../src/avutil/package.json'),
'avplayer-ui': path.resolve(__dirname, '../src/ui/avplayer/package.json'),
videoscale: path.resolve(__dirname, '../src/videoscale/package.json')
}

const packages = {
audioresample: JSON.parse(fs.readFileSync(files['audioresample'], 'utf8')),
audiostretchpitch: JSON.parse(fs.readFileSync(files['audiostretchpitch'], 'utf8')),
avcodec: JSON.parse(fs.readFileSync(files['avcodec'], 'utf8')),
avfilter: JSON.parse(fs.readFileSync(files['avfilter'], 'utf8')),
avformat: JSON.parse(fs.readFileSync(files['avformat'], 'utf8')),
avnetwork: JSON.parse(fs.readFileSync(files['avnetwork'], 'utf8')),
avpipeline: JSON.parse(fs.readFileSync(files['avpipeline'], 'utf8')),
avplayer: JSON.parse(fs.readFileSync(files['avplayer'], 'utf8')),
avprotocol: JSON.parse(fs.readFileSync(files['avprotocol'], 'utf8')),
avrender: JSON.parse(fs.readFileSync(files['avrender'], 'utf8')),
avtranscoder: JSON.parse(fs.readFileSync(files['avtranscoder'], 'utf8')),
avutil: JSON.parse(fs.readFileSync(files['avutil'], 'utf8')),
'avplayer-ui': JSON.parse(fs.readFileSync(files['avplayer-ui'], 'utf8')),
videoscale: JSON.parse(fs.readFileSync(files['videoscale'], 'utf8')),
}

function update(name) {
const file = files[name]
const json = packages[name]
json.version = argv.pubVersion
fs.writeFileSync(file, JSON.stringify(json, null, 2), 'utf8')
}

const keys = Object.keys(files)
for (let i = 0; i < keys.length; i++) {
update(keys[i])
}
2 changes: 1 addition & 1 deletion src/audioresample/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/audioresample",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 音频重采样模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/audiostretchpitch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/audiostretchpitch",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 音频变调变速",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avcodec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avcodec",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 编解码模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avfilter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avfilter",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia filter 模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avformat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avformat",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia avformat",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avnetwork/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avnetwork",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 网络模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avpipeline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avpipeline",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 处理管线模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avplayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avplayer",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia avplayer",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avprotocol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avprotocol",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 协议模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avrender",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 渲染模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avtranscoder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avtranscoder",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia avtranscoder",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/avutil/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avutil",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 工具模块",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/cheap
Submodule cheap updated 1 files
+1 −1 package.json
2 changes: 1 addition & 1 deletion src/common
Submodule common updated 1 files
+1 −1 package.json
2 changes: 1 addition & 1 deletion src/ui/avplayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/avplayer-ui",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia avplayer ui",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/videoscale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libmedia/videoscale",
"version": "0.1.2",
"version": "0.2.0",
"description": "libmedia 图像格式处理",
"repository": {
"type": "git",
Expand Down

0 comments on commit f5ea513

Please sign in to comment.