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
|
build
|
||||||
|
.env
|
||||||
|
|
|
@ -250,13 +250,13 @@ file is just JSON, and it should be called
|
||||||
<h2 id="project-status">Project Status</h2>
|
<h2 id="project-status">Project Status</h2>
|
||||||
<p>
|
<p>
|
||||||
<b>Telodendria</b> is a very ambitious project. There's a lot that needs
|
<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
|
to happen yet before it is usable. At the moment, there's nothing that
|
||||||
nothing that even remotely resembles a Matrix homeserver here; we're still
|
even remotely resembles a Matrix homeserver here; I'm still
|
||||||
getting off the ground and building a foundation.
|
getting off the ground and building a foundation.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Just because there's nothing here yet doesn't mean you should go away
|
But 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
|
I could always use help, so you are more than welcome to help
|
||||||
out if you want things to go quicker. Please see the
|
out if you want things to go quicker. Please see the
|
||||||
<a href="#contributing">Contributing</a> section for details on how you
|
<a href="#contributing">Contributing</a> section for details on how you
|
||||||
can get involved.
|
can get involved.
|
||||||
|
@ -281,9 +281,10 @@ can get involved.
|
||||||
<li><s>Combine library code files</s></li>
|
<li><s>Combine library code files</s></li>
|
||||||
<li><s>Implement configuration file parsing using the hash map</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><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>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>Implement a simple HTTP server</li>
|
||||||
<li>
|
<li>
|
||||||
Design the server architecture
|
Design the server architecture
|
||||||
|
@ -334,6 +335,7 @@ on my list for that:
|
||||||
<li>Update Rationale section</li>
|
<li>Update Rationale section</li>
|
||||||
<li>Update Project description (no longer a CGI binary)</li>
|
<li>Update Project description (no longer a CGI binary)</li>
|
||||||
<li>Update project code requirements (ANSI C, POSIX.1c)</li>
|
<li>Update project code requirements (ANSI C, POSIX.1c)</li>
|
||||||
|
<li>Clean up dark mode colors (tables, background, code snippets</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="rationale">Rationale</h2>
|
<h2 id="rationale">Rationale</h2>
|
||||||
<p>
|
<p>
|
||||||
|
|
69
make.sh
69
make.sh
|
@ -1,15 +1,27 @@
|
||||||
#!/usr/bin/env sh
|
#!/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\""
|
: "${TELODENDRIA_VERSION:=0.0.0}"
|
||||||
INCLUDES="-Isrc/include"
|
: "${CVS_TAG:=Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')}"
|
||||||
|
|
||||||
CC="${CC:-cc}"
|
: "${HEADERS:=-D_POSIX_C_SOURCE=199506L -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\"}"
|
||||||
CFLAGS="-Wall -Werror -pedantic -std=c89 -O3 $HEADERS $INCLUDES"
|
: "${INCLUDES:=-Isrc/include}"
|
||||||
LDFLAGS="-static -flto -fdata-sections -ffunction-sections -s -Wl,-static -Wl,-gc-sections"
|
|
||||||
PROG="telodendria"
|
: "${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() {
|
mod_time() {
|
||||||
if [ -n "$1" ] && [ -f "$1" ]; then
|
if [ -n "$1" ] && [ -f "$1" ]; then
|
||||||
|
@ -65,6 +77,46 @@ recipe_test() {
|
||||||
echo "Unit tests are not implemented yet."
|
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
|
for recipe in $@; do
|
||||||
recipe_$recipe
|
recipe_$recipe
|
||||||
done
|
done
|
||||||
|
@ -72,3 +124,4 @@ done
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
recipe_build
|
recipe_build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue