Skip to content

Commit

Permalink
chore: remove set_version
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl committed Sep 11, 2019
1 parent 40b0247 commit 0065851
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -25,5 +25,6 @@ ENV NODE_ENV= \
DB= \
REDIS= \
SENTRY=
ENV VERSION=
CMD ["node", "dist/haruna.js"]

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -7,7 +7,6 @@
"license": "UNLICENSED",
"private": true,
"scripts": {
"set_version": "node set_version.js",
"prebuild": "yarn lint",
"build": "rimraf dist && tsc",
"lint": "eslint src --ext .ts"
Expand Down
11 changes: 0 additions & 11 deletions set_version.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/bot/client/HarunaClient.ts
Expand Up @@ -15,7 +15,6 @@ import { Counter, register } from 'prom-client';
import { createServer, Server } from 'http';
import { parse } from 'url';
import { init } from '@sentry/node';
import { VERSION } from '../../util/version';

declare module 'discord-akairo' {
interface AkairoClient {
Expand Down Expand Up @@ -193,7 +192,7 @@ export default class HarunaClient extends AkairoClient {
init({
dsn: process.env.SENTRY,
environment: process.env.NODE_ENV,
release: VERSION
release: process.env.VERSION!
});
} else {
process.on('unhandledRejection', (err: any): Logger => this.logger.error(`[UNHANDLED REJECTION] ${err.message}`, err.stack));
Expand Down
4 changes: 1 addition & 3 deletions src/bot/commands/util/stats.ts
Expand Up @@ -4,8 +4,6 @@ import { stripIndents } from 'common-tags';
import * as moment from 'moment';
import 'moment-duration-format';

const { version } = require('../../../../package.json'); // eslint-disable-line

export default class StatsCommand extends Command {
public constructor() {
super('stats', {
Expand Down Expand Up @@ -33,7 +31,7 @@ export default class StatsCommand extends Command {
`,
true
)
.addField('❯ Version', `v${version}`, true)
.addField('❯ Version', `[${process.env.VERSION!}](https://github.com/Naval-Base/haruna/commit/${process.env.VERSION!})`, true)
.addField('❯ Source Code', '[View Here](https://github.com/Naval-Base/haruna)', true)
.addField(
'❯ Library',
Expand Down

0 comments on commit 0065851

Please sign in to comment.