1 Commits

Author SHA1 Message Date
Gianni Carafa
5392992350 WIP: write version on build to form HTML 2023-11-15 18:02:58 +01:00
4 changed files with 13 additions and 4 deletions

View File

@@ -22,7 +22,11 @@ jobs:
-
name: Set version
run: |
echo -n $(git describe --tags --abbrev=0) > handlers/VERSION
VERSION=$(git describe --tags --abbrev=0)
echo -n $VERSION > handlers/VERSION
sed -i 's\VERSION\${VERSION}\g' handlers/form.html
echo handlers/form.html >> .gitignore
echo .gitignore >> .gitignore
-
name: Set up Go
uses: actions/setup-go@v3

View File

@@ -42,7 +42,11 @@ jobs:
- name: Set version
id: version
run: |
echo ${GITHUB_REF#refs/tags/v} > handlers/VERSION
VERSION=$(git describe --tags --abbrev=0)
echo -n $VERSION > handlers/VERSION
sed -i 's\VERSION\${VERSION}\g' handlers/form.html
echo handlers/form.html >> .gitignore
echo .gitignore >> .gitignore
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer

View File

@@ -176,6 +176,7 @@ See in [ruleset.yaml](ruleset.yaml) for an example.
To run a development server at http://localhost:8080:
```bash
echo "DEV" > handler/VERSION
RULESET="./ruleset.yaml" go run cmd/main.go
```

View File

@@ -28,8 +28,8 @@
<footer class="mt-10 mx-4 text-center text-slate-600 dark:text-slate-400">
<p>
Code Licensed Under GPL v3.0 |
<a href="https://github.com/everywall/ladder" class="hover:text-blue-500 hover:underline underline-offset-2 transition-colors duration-300">View Source</a> |
<a href="https://github.com/everywall" class="hover:text-blue-500 hover:underline underline-offset-2 transition-colors duration-300">Everywall</a>
<a href="https://github.com/everywall/ladder" class="hover:text-blue-500 hover:underline underline-offset-2 transition-colors duration-300">Source</a> |
<a href="https://github.com/everywall/ladder/releases" class="hover:text-blue-500 hover:underline underline-offset-2 transition-colors duration-300">VERSION</a>
</p>
</footer>
</div>