Version number to foorter #209

This commit is contained in:
Jokob-sk
2023-05-13 14:09:19 +10:00
parent 8e86343942
commit fc79ffc956
4 changed files with 39 additions and 4 deletions

View File

@@ -46,6 +46,14 @@ jobs:
type=ref,event=branch,suffix=-{{ sha }}
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
- uses: actions/checkout@master
- name: Update version
uses: brettdorrans/write-version-to-file@master
with:
filename: '/.VERSION'
placeholder: '${VERSION}'
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2

View File

@@ -14,8 +14,32 @@
<!-- &copy; 2020 Puche -->
<span style="display:inline-block; transform: rotate(180deg)">&copy;</span>
2020 Puche (2022+ <a href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) - Buildtime: <?php echo file_get_contents( "buildtimestamp.txt");?> - Version <?php echo file_get_contents( ".VERSION");?>
2020 Puche (2022+ <a href="mailto:jokob@duck.com?subject=PiAlert">jokob-sk</a>) | <b>Built on: </b>
<?php
echo date("Y-m-d", ((int)file_get_contents( "buildtimestamp.txt")));
?>
| <b> Version: </b>
<?php
$filename = "/.VERSION";
if(file_exists($filename))
{
echo file_get_contents($filename);
}
else{
echo "File not found";
}
?>
|
<a href="https://github.com/jokob-sk/Pi.Alert/tree/main/docs" target="_blank">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
@@ -57,6 +81,9 @@
<!-- Pi.Alert -------------------------------------------------------------- -->
<script src="js/pialert_common.js"></script>
<script src="js/handle_version.js"></script>
<script>
let time = new Date().toLocaleString("en-UK", { timeZone: "<?php echo $timeZone?>" });
</script>
</body>
</html>

View File

@@ -271,7 +271,7 @@
}],
"description": [{
"language_code":"en_us",
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DHCPLSS_RUN\"><code>DHCPLSS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#SNMPDSC_RUN\"><code>SNMPDSC_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
}]
},
{

View File

@@ -391,7 +391,7 @@
}],
"description": [{
"language_code":"en_us",
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#DHCPLSS_RUN\"><code>DHCPLSS_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
"string" : "Only enabled if you select <code>schedule</code> in the <a href=\"#UNFIMP_RUN\"><code>UNFIMP_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
}]
},
{