Compare commits
1 Commits
main
..
d52b203eb7
| Author | SHA1 | Date | |
|---|---|---|---|
| d52b203eb7 |
@@ -23,14 +23,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate version
|
||||
run: |
|
||||
VERSION=$(date +%Y%d%m_%H%M)
|
||||
GIT_SHA=$(git rev-parse --short HEAD)
|
||||
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_ENV
|
||||
|
||||
echo "Version: $VERSION Commit:$GIT_SHA" > public/VERSION
|
||||
run: echo "VERSION=$(date +%Y%d%m_%H%M)" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
|
||||
@@ -71,15 +71,6 @@
|
||||
<a href="/api-docs" target="_blank" class="btn btn-outline-secondary btn-sm">View docs</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Version info -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-body">
|
||||
<div id="versionInfo" class="text-center text-muted small">
|
||||
Loading version...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
@@ -96,24 +87,6 @@
|
||||
location.reload();
|
||||
});
|
||||
})();
|
||||
|
||||
// Fetch and display version
|
||||
fetch('/VERSION')
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.text();
|
||||
})
|
||||
.then(versionText => {
|
||||
const versionInfo = document.getElementById('versionInfo');
|
||||
versionInfo.textContent = versionText.trim() || 'Version not available';
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Could not load version:', error);
|
||||
const versionInfo = document.getElementById('versionInfo');
|
||||
versionInfo.textContent = 'Version not available';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user