Files
Bubberstation/tools/ci/check_genesis.sh
LucyandRoxy 9992246ac4 Add a new lint to ensure genesis_call.dme isn't accidentally changed (#92014)
## About The Pull Request

Port of https://github.com/Monkestation/Monkestation2.0/pull/7121

> adds a new lint to just verify the sha256sum of
`code/genesis_call.dme`, to ensure it's not accidentally mangled from
someone using dreammaker as an IDE instead of vscode or something:
> 
>
![image](https://github.com/user-attachments/assets/621ad2b0-ec27-4fe5-b870-e08e726543fa)

## Changelog

> no actual in-game changes
2025-07-19 20:29:22 -04:00

21 lines
705 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
#ANSI Escape Codes for colors to increase contrast of errors
RED="\033[0;31m"
GREEN="\033[0;32m"
BLUE="\033[0;34m"
NC="\033[0m" # No Color
if sha256sum -c tools/ci/genesis_call.dme.sha256sum ; then
echo -e "${GREEN}code/genesis_call.dme is unchanged.${NC}"
else
echo -e "${RED}code/genesis_call.dme has been changed!${NC}"
echo -e "${BLUE}This is likely not intentional, please revert any changes made to it.${NC}"
echo -e "${BLUE}On the unlikely occurance that you ARE intentionally modifying that file, replace the contents of tools/ci/genesis_call.dme.sha256sum with the following:${NC}"
sha256sum tools/ci/genesis_call.dme.sha256sum
exit 1
fi