Skip to content

Commit

Permalink
Update .dockerignore and App.vue
Browse files Browse the repository at this point in the history
- Ignore *node_modules*, *compose.yml*, and *Dockerfile* in .dockerignore
- Update App.vue to display the git tag/version as a badge
  • Loading branch information
Codycody31 committed Oct 13, 2023
1 parent 83323a7 commit bafb953
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/node_modules
npm-debug.log
*node_modules*
*compose.yml*
*Dockerfile*
38 changes: 37 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
height="30"
width="150"
/>
<span class="alpha-badge">ALPHA</span>
<span class="badge alpha-badge" v-if="gitTag.type == 'commit'">
{{ gitTag.version }}
</span>
<span class="badge bg-success" v-else>
{{ gitTag.version }}
</span>
</router-link>

<!-- Navigation Toggler for Mobile -->
Expand Down Expand Up @@ -223,6 +228,22 @@ export default {
ModalsContainer,
AdminLayout,
},
computed: {
gitTag() {
// If tag is a version number, return it
if (process.env.VUE_APP_GIT_TAG.match(/^v\d+\.\d+\.\d+$/)) {
return {
version: process.env.VUE_APP_GIT_TAG,
type: "version",
};
} else {
return {
version: process.env.VUE_APP_GIT_COMMIT_HASH,
type: "commit",
};
}
},
},
};
</script>

Expand All @@ -244,4 +265,19 @@ export default {
vertical-align: middle; /* align it with the logo and site name */
margin-left: 5px; /* spacing from the logo or site name */
}
.production-badge {
background-color: #00ff00; /* green color */
color: #ffffff; /* white text color */
padding: 2px 8px; /* some padding for spacing */
border-radius: 4px; /* rounded corners */
font-size: 0.8em; /* smaller font size than regular text */
font-weight: bold; /* bold text */
vertical-align: middle; /* align it with the logo and site name */
margin-left: 5px; /* spacing from the logo or site name */
}
.badge {
margin-left: 5px;
}
</style>

0 comments on commit bafb953

Please sign in to comment.