forked from Telodendria/Telodendria
Add a release script.
This commit is contained in:
parent
13a1fdecf9
commit
3988c2f9be
3 changed files with 70 additions and 14 deletions
|
@ -1 +1,2 @@
|
|||
build
|
||||
.env
|
||||
|
|
|
@ -250,13 +250,13 @@ file is just JSON, and it should be called
|
|||
<h2 id="project-status">Project Status</h2>
|
||||
<p>
|
||||
<b>Telodendria</b> is a very ambitious project. There's a lot that needs
|
||||
to happen yet before it is even remotely usable. At the moment, there's
|
||||
nothing that even remotely resembles a Matrix homeserver here; we're still
|
||||
to happen yet before it is usable. At the moment, there's nothing that
|
||||
even remotely resembles a Matrix homeserver here; I'm still
|
||||
getting off the ground and building a foundation.
|
||||
</p>
|
||||
<p>
|
||||
Just because there's nothing here yet doesn't mean you should go away
|
||||
though! We desparately need help, so you are more than welcome to help
|
||||
But just because there's nothing here yet doesn't mean you should go away!
|
||||
I could always use help, so you are more than welcome to help
|
||||
out if you want things to go quicker. Please see the
|
||||
<a href="#contributing">Contributing</a> section for details on how you
|
||||
can get involved.
|
||||
|
@ -281,9 +281,10 @@ can get involved.
|
|||
<li><s>Combine library code files</s></li>
|
||||
<li><s>Implement configuration file parsing using the hash map</s></li>
|
||||
<li><s>Base64 encoding/decoding with padded/unpadded support</s></li>
|
||||
<li>Write a release script</li>
|
||||
<li><s>Write a release script</s></li>
|
||||
<li>Implement a JSON library using the hash map and array</li>
|
||||
<li>Figure out how to write unit tests for array/hashmap/etc</li>
|
||||
<li><s>Figure out how to w</s>Write unit tests for array/hashmap/etc</li>
|
||||
<li>Add license/documentation comments to all source files</li>
|
||||
<li>Implement a simple HTTP server</li>
|
||||
<li>
|
||||
Design the server architecture
|
||||
|
@ -334,6 +335,7 @@ on my list for that:
|
|||
<li>Update Rationale section</li>
|
||||
<li>Update Project description (no longer a CGI binary)</li>
|
||||
<li>Update project code requirements (ANSI C, POSIX.1c)</li>
|
||||
<li>Clean up dark mode colors (tables, background, code snippets</li>
|
||||
</ul>
|
||||
<h2 id="rationale">Rationale</h2>
|
||||
<p>
|
||||
|
|
69
make.sh
69
make.sh
|
@ -1,15 +1,27 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
TELODENDRIA_VERSION="0.0.1"
|
||||
CVS_TAG="Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')"
|
||||
#
|
||||
# Set variables
|
||||
#
|
||||
# This syntax may look odd, but as far as I can tell, it is POSIX,
|
||||
# and it allows the values to be overridden by the environment,
|
||||
# such that these serve more as sane defaults than hard requirements.
|
||||
#
|
||||
|
||||
HEADERS="-D_POSIX_C_SOURCE=199506L -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\""
|
||||
INCLUDES="-Isrc/include"
|
||||
: "${TELODENDRIA_VERSION:=0.0.0}"
|
||||
: "${CVS_TAG:=Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')}"
|
||||
|
||||
CC="${CC:-cc}"
|
||||
CFLAGS="-Wall -Werror -pedantic -std=c89 -O3 $HEADERS $INCLUDES"
|
||||
LDFLAGS="-static -flto -fdata-sections -ffunction-sections -s -Wl,-static -Wl,-gc-sections"
|
||||
PROG="telodendria"
|
||||
: "${HEADERS:=-D_POSIX_C_SOURCE=199506L -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\"}"
|
||||
: "${INCLUDES:=-Isrc/include}"
|
||||
|
||||
: "${CC:=cc}"
|
||||
: "${CFLAGS:=-Wall -Werror -pedantic -std=c89 -O3 $HEADERS $INCLUDES}"
|
||||
: "${LDFLAGS:=-static -flto -fdata-sections -ffunction-sections -s -Wl,-static -Wl,-gc-sections}"
|
||||
: "${PROG:=telodendria}"
|
||||
|
||||
if [ -f "$(pwd)/.env" ]; then
|
||||
. "$(pwd)/.env"
|
||||
fi
|
||||
|
||||
mod_time() {
|
||||
if [ -n "$1" ] && [ -f "$1" ]; then
|
||||
|
@ -65,6 +77,46 @@ recipe_test() {
|
|||
echo "Unit tests are not implemented yet."
|
||||
}
|
||||
|
||||
recipe_site() {
|
||||
if [ -z "$TELODENDRIA_PUB" ]; then
|
||||
echo "No public root directory specified."
|
||||
echo "Set TELODENDRIA_PUB."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "Telodendria.css" "$TELODENDRIA_PUB/"
|
||||
cp "Telodendria.html" "$TELODENDRIA_PUB/index.html"
|
||||
cp "release/telodendria-signify.pub" "$TELODENDRIA_PUB/"
|
||||
}
|
||||
|
||||
recipe_release() {
|
||||
if [ -z "$TELODENDRIA_PUB" ]; then
|
||||
echo "No public root directory specified."
|
||||
echo "Set TELODENDRIA_PUB."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$TELODENDRIA_SIGNIFY_SECRET" ]; then
|
||||
echo "No signify secret key specified."
|
||||
echo "Set TELODENDRIA_SIGNIFY_SECRET."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$TELODENDRIA_PUB/pub/v$TELODENDRIA_VERSION"
|
||||
cd "$TELODENDRIA_PUB/pub/v$TELODENDRIA_VERSION"
|
||||
|
||||
cvs export "-r$CVS_TAG" "Telodendria"
|
||||
mv "Telodendria" "Telodendria-v$TELODENDRIA_VERSION"
|
||||
tar -czf "Telodendria-v$TELODENDRIA_VERSION.tar.gz" \
|
||||
"Telodendria-v$TELODENDRIA_VERSION"
|
||||
rm -r "Telodendria-v$TELODENDRIA_VERSION"
|
||||
sha256 "Telodendria-v$TELODENDRIA_VERSION.tar.gz" \
|
||||
> "Telodendria-v$TELODENDRIA_VERSION.tar.gz.sha256"
|
||||
signify -S -s "$TELODENDRIA_SIGNIFY_SECRET" \
|
||||
-m "Telodendria-v$TELODENDRIA_VERSION.tar.gz" \
|
||||
-x "Telodendria-v$TELODENDRIA_VERSION.tar.gz.sig"
|
||||
}
|
||||
|
||||
for recipe in $@; do
|
||||
recipe_$recipe
|
||||
done
|
||||
|
@ -72,3 +124,4 @@ done
|
|||
if [ -z "$1" ]; then
|
||||
recipe_build
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue