1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-08 13:06:15 +02:00

Mobile: Include commit information in version information screen (#10829)

This commit is contained in:
Henry Heino 2024-08-08 11:57:32 -07:00 committed by GitHub
parent 6d98f8102d
commit d2ae02d066
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 17 additions and 2 deletions

View File

@ -51,6 +51,7 @@ packages/app-desktop/node_modules
packages/app-desktop/packageInfo.js
packages/app-desktop/services/electron-context-menu.js
packages/app-desktop/vendor/lib/
packages/app-mobile/packageInfo.js
packages/app-mobile/android
packages/app-mobile/**/*.bundle.js
packages/app-mobile/web/public/pluginAssets/**/*

View File

@ -74,3 +74,5 @@ web/public/pluginAssets/*
utils/fs-driver-android.js
android/app/build-*
packageInfo.js

View File

@ -1,5 +1,6 @@
const gulp = require('gulp');
const utils = require('@joplin/tools/gulp/utils');
const compilePackageInfo = require('@joplin/tools/compilePackageInfo');
import injectedJsGulpTasks from './tools/buildInjectedJs/gulpTasks';
@ -10,6 +11,12 @@ const tasks = {
copyWebAssets: {
fn: require('./tools/copyAssets').default,
},
compilePackageInfo: {
fn: async () => {
await compilePackageInfo(`${__dirname}/package.json`, `${__dirname}/packageInfo.js`);
},
},
...injectedJsGulpTasks,
podInstall: {
fn: require('./tools/podInstall'),
@ -39,6 +46,7 @@ gulp.task('watchInjectedJs', gulp.series(
));
gulp.task('build', gulp.series(
'compilePackageInfo',
'buildInjectedJs',
'copyWebAssets',
'encodeAssets',

View File

@ -1,12 +1,16 @@
import shim from '@joplin/lib/shim';
import { PackageInfo } from '@joplin/lib/versionInfo';
import ReactNativeVersionInfo from 'react-native-version-info';
const basePackageInfo = require('../packageInfo.js');
const getPackageInfo = (): PackageInfo => {
const version = shim.appVersion();
return {
description: 'Joplin for Mobile',
name: 'Joplin',
...basePackageInfo,
// Android, iOS, and Web have independent versions -- fetch this
// information at runtime:
name: 'Joplin Mobile',
version,
build: {
appId: ReactNativeVersionInfo.bundleIdentifier,