Import Soapbox version/metadata from package.json
This commit is contained in:
parent
f116d57d11
commit
dfa1443832
2 changed files with 8 additions and 6 deletions
|
@ -7,13 +7,15 @@ import { connect } from 'react-redux';
|
||||||
import { openModal } from '../../../actions/modal';
|
import { openModal } from '../../../actions/modal';
|
||||||
import { logOut } from 'soapbox/actions/auth';
|
import { logOut } from 'soapbox/actions/auth';
|
||||||
import { isStaff } from 'soapbox/utils/accounts';
|
import { isStaff } from 'soapbox/utils/accounts';
|
||||||
|
import pkg from '../../../../../package.json';
|
||||||
|
|
||||||
|
const shortRepoName = url => new URL(url).pathname.substring(1);
|
||||||
|
|
||||||
// FIXME: Let this be configured
|
|
||||||
const sourceCode = {
|
const sourceCode = {
|
||||||
name: 'soapbox-fe',
|
name: pkg.name,
|
||||||
url: 'https://gitlab.com/soapbox-pub/soapbox-fe',
|
url: pkg.repository.url,
|
||||||
repository: 'soapbox-pub/soapbox-fe',
|
repository: shortRepoName(pkg.repository.url),
|
||||||
version: '1.1.0',
|
version: pkg.version,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"homepage": "https://soapbox.pub/",
|
"homepage": "https://soapbox.pub/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.com/soapbox-pub/soapbox-fe.git"
|
"url": "https://gitlab.com/soapbox-pub/soapbox-fe"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"fediverse",
|
"fediverse",
|
||||||
|
|
Loading…
Reference in a new issue