Skip to content

Commit

Permalink
fixed version info
Browse files Browse the repository at this point in the history
  • Loading branch information
SelfhostedPro committed Feb 8, 2021
1 parent f94a40f commit 43173a2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Build Vue
FROM node:14.5.0-alpine as build-stage

ARG VUE_APP_VERSION
ENV VUE_APP_VERSION=${VUE_APP_VERSION}

WORKDIR /app
COPY ./frontend/package*.json ./
RUN npm install
Expand All @@ -11,8 +14,6 @@ RUN npm run build
FROM lsiobase/alpine:3.12 as deploy-stage
# MAINTANER Your Name "info@selfhosted.pro"

ARG VUE_APP_VERSION=devel
ENV VUE_APP_VERSION=${VUE_APP_VERSION}
# Set Variables
ENV PYTHONIOENCODING=UTF-8
ENV THEME=Default
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yacht",
"version": "0.1.0",
"version": "0.0.6",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
16 changes: 7 additions & 9 deletions frontend/src/views/ServerSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</v-card-text>
</v-col>
</v-row>
<v-card-text>Version: {{get_version()}}</v-card-text>
<v-card-text>Version: {{version}}</v-card-text>
</v-card>
</v-container>
</v-card>
Expand All @@ -31,16 +31,14 @@
// import { mapState } from "vuex";
import ServerSettingsNav from "../components/serverSettings/ServerSettingsNav";
export default {
data() {
return {
version: process.env.VUE_APP_VERSION || 'unreleased',
};
},
components: {
Nav: ServerSettingsNav,
},
methods: {
get_version() {
if (process.env.VUE_APP_VERSION) {
return process.env.VUE_APP_VERSION;
} else return null;
},
},
}
};
</script>

Expand Down
1 change: 1 addition & 0 deletions root/etc/cont-init.d/32-env
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ do

sed -i 's|VUE_APP_THEME|'${THEME}'|g' $file
sed -i 's|VUE_APP_LOGO|'${LOGO}'|g' $file
# sed -i 's|VUE_APP_VERSION|'${VERSION}'|g' $file

done

0 comments on commit 43173a2

Please sign in to comment.