mirror of
https://github.com/Retropex/bitfeed.git
synced 2025-05-12 19:20:46 +02:00
Merge pull request #39 from turbo-cunnos/version_display
Version display
This commit is contained in:
commit
79519066f7
@ -36,5 +36,8 @@
|
||||
"svelte": "^3.44.3",
|
||||
"svelte-preprocess": "^4.10.1",
|
||||
"svelte-select": "^4.4.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-json": "^4.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import html from '@rollup/plugin-html';
|
||||
import copy from 'rollup-plugin-copy'
|
||||
import babel from '@rollup/plugin-babel';
|
||||
import fs from 'fs'
|
||||
import json from "@rollup/plugin-json";
|
||||
|
||||
configDotenv();
|
||||
|
||||
@ -123,7 +124,8 @@ export default {
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser(),
|
||||
glslify()
|
||||
glslify(),
|
||||
json()
|
||||
],
|
||||
watch: {
|
||||
clearScreen: false
|
||||
|
@ -3,7 +3,7 @@ import SocialLink from '../components/SocialLink.svelte'
|
||||
import twitterIcon from '../assets/icon/cib-twitter.svg'
|
||||
import atIcon from '../assets/icon/cil-at.svg'
|
||||
import Mononaut from '../components/Mononaut.svelte'
|
||||
|
||||
import config from '../../package.json'
|
||||
</script>
|
||||
|
||||
<style type="text/scss">
|
||||
@ -53,4 +53,5 @@ import Mononaut from '../components/Mononaut.svelte'
|
||||
<p>Or email any recipient at
|
||||
<SocialLink icon={atIcon} href="mailto:bitfeed@monospace.live" color="var(--monospace-purple)">monospace.live</SocialLink>
|
||||
</p>
|
||||
<p><b class="mononaut"> v{config.version} </b></p>
|
||||
</div>
|
||||
|
@ -62,7 +62,7 @@ defmodule BitcoinStream.Server do
|
||||
restart: :permanent
|
||||
}
|
||||
]
|
||||
|
||||
version()
|
||||
opts = [strategy: :one_for_one, name: BitcoinStream.Application]
|
||||
Supervisor.start_link(children, opts)
|
||||
end
|
||||
@ -77,4 +77,15 @@ defmodule BitcoinStream.Server do
|
||||
}
|
||||
]
|
||||
end
|
||||
|
||||
defp version() do
|
||||
{:ok, vsn} = :application.get_key(:bitcoin_stream, :vsn)
|
||||
splash_text =
|
||||
"""
|
||||
####################################################
|
||||
### BITFEED VERSION IS: v#{vsn} ###
|
||||
####################################################
|
||||
"""
|
||||
IO.puts(splash_text)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user