mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-23 05:54:19 +02:00
Add Hashes.md test
This commit is contained in:
parent
9c2aa86182
commit
d00de8fb1e
3 changed files with 61 additions and 0 deletions
|
|
@ -312,6 +312,11 @@ There are four test suites:
|
|||
* Note that this is only expected to pass just before
|
||||
a release. This checks mostly administrative things
|
||||
to check that a release is ready.
|
||||
* Note that non-auto tests are files in `release-non-auto-checks`
|
||||
and have to contain the release version and current date in
|
||||
YYYY-mm-dd format on seperate lines. This is our imperfect attempt
|
||||
to guarantee some hard-to-automate checks are carried out before
|
||||
a release is undertaken.
|
||||
|
||||
Every commit should pass at least the basic and devel suites.
|
||||
|
||||
|
|
@ -457,6 +462,7 @@ The release procedure outlines the process for a release to occur.
|
|||
* [ ] `git pull origin development`
|
||||
* [ ] `git push origin development`
|
||||
* [ ] New semantic version number determined
|
||||
* [ ] `meson test -C build/` just to get an overview
|
||||
* [ ] Adjust version number
|
||||
* [ ] meson.build
|
||||
* [ ] git tag
|
||||
|
|
@ -503,6 +509,7 @@ The release procedure outlines the process for a release to occur.
|
|||
* [ ] `git commit` and insert message
|
||||
* [ ] `git tag -u keyid version HEAD` and insert message
|
||||
* [ ] `git tag -v version` and check output
|
||||
* [ ] `meson test -C build/` last check before the push
|
||||
* [ ] `git push --tags origin master`
|
||||
* [ ] `git checkout development` (merge to development depends on whether release was a hotfix)
|
||||
* [ ] `git merge master`
|
||||
|
|
|
|||
|
|
@ -355,4 +355,5 @@ test('Scan-build (static analysis)', find_program('test/scan-build'), env : [ ''
|
|||
test('Arguments', find_program('test/arguments'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'basic')
|
||||
test('Environment Variables', find_program('test/environment-variables'), env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'basic')
|
||||
test('Semantic versioning', find_program('test/versions'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'release')
|
||||
test('Hashes.md', find_program('test/hashes-md'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'release')
|
||||
test('Non-auto tests', find_program('test/non-auto-tests'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'release')
|
||||
|
|
|
|||
53
test/hashes-md
Normal file
53
test/hashes-md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2023, project-repo and the cagebreak contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
VERSION=$1
|
||||
RESULT=0
|
||||
|
||||
# shellcheck disable=2164
|
||||
cd "${MESONCURRENTCONFIGDIR}"
|
||||
|
||||
cb256=$(sha256sum build/cagebreak | cut -d " " -f1 )
|
||||
cb256man1=$(sha256sum build/cagebreak.1 | cut -d " " -f1 )
|
||||
cb256man5=$(sha256sum build/cagebreak-config.5 | cut -d " " -f1 )
|
||||
cb256man7=$(sha256sum build/cagebreak-socket.7 | cut -d " " -f1 )
|
||||
cb512=$(sha512sum build/cagebreak | cut -d " " -f1 )
|
||||
cb512man1=$(sha512sum build/cagebreak.1 | cut -d " " -f1 )
|
||||
cb512man5=$(sha512sum build/cagebreak-config.5 | cut -d " " -f1 )
|
||||
cb512man7=$(sha512sum build/cagebreak-socket.7 | cut -d " " -f1 )
|
||||
|
||||
hashesdoc=$(head -21 Hashes.md)
|
||||
|
||||
testdoc="# Hashes
|
||||
|
||||
$VERSION cagebreak
|
||||
|
||||
* sha 256: ${cb256}
|
||||
* sha 512: ${cb512}
|
||||
|
||||
$VERSION cagebreak.1
|
||||
|
||||
* sha 256: ${cb256man1}
|
||||
* sha 512: ${cb512man1}
|
||||
|
||||
$VERSION cagebreak-config.5
|
||||
|
||||
* sha 256: ${cb256man5}
|
||||
* sha 512: ${cb512man5}
|
||||
|
||||
$VERSION cagebreak-socket.7
|
||||
|
||||
* sha 256: ${cb256man7}
|
||||
* sha 512: ${cb512man7}"
|
||||
|
||||
# email key
|
||||
if [[ "${hashesdoc}" = "${testdoc}" ]]
|
||||
then
|
||||
echo "[x] Hashes.md"
|
||||
else
|
||||
RESULT=1
|
||||
echo "[ ] Hashes.md"
|
||||
fi
|
||||
|
||||
exit "${RESULT}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue