Skip to content

Commit

Permalink
Prepare for CI/CD automatic deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonjh committed Jan 3, 2021
1 parent 061a0ee commit d6fd19c
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
image: alpine:latest
pages:
tags:
- Linux-x86_64
stage: deploy
script: echo "Pages Deploy"
artifacts:
paths:
- public
only:
- master
1 change: 1 addition & 0 deletions .patch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
1 change: 1 addition & 0 deletions .timestamp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sun Jan 3 02:21:13 PM EST 2021
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Oxford 153 Entitlement: Mark I. (OX153MK1)
The Oxford 153 Entitlement: Mark I. (OX153Mk1)

LEGAL TERMS AND CONDITIONS FOR USE, COPYING, DISTRIBUTION, AND MODIFICATION:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Oxford 153 Entitlement: Mark I. (OX153MK1)
# The Oxford 153 Entitlement: Mark I. (OX153Mk1)

[![CodacyBadge](https://api.codacy.com/project/badge/Grade/f297f8df96c149c4853280935d554be1)](https://app.codacy.com/gh/johnsonjh/OX153)

Expand Down
185 changes: 185 additions & 0 deletions makeweb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
#####################################################################
# #
# This is Gridfinity OX153Mk1 makeweb (Release 20210103A) [GFODLv1] #
# #
#####################################################################
# #
# The following license applies to all OUTPUT of this tool: #
# #
#####################################################################
# #
# The Gridfinity Open Documentation License v1.0 (GFODLv1) #
# #
# Copyright (c) 2021 Gridfinity, LLC. <admin@gridfinity.com> #
# Copyright (c) 2021 Jeffrey H. Johnson. <jeff@gridfinity.com> #
# #
# All Rights Reserved. #
# #
# Redistribution and use, in source and compiled forms, #
# with or without modification, are permitted, provided #
# that the following conditions are met: #
# #
# 1. Redistributions of source code must retain the #
# above copyright notice, this list of conditions, #
# and the following disclaimer, within the first #
# ten lines of this file, completely unmodified. #
# #
# 2. Redistributions in compiled form must reproduce #
# the above copyright notice, this list of conditions, #
# and the following disclaimer in the documentation, #
# and/or other materials provided with the distribution. #
# #
# THIS DOCUMENTATION IS PROVIDED BY THE AUTHORS "AS IS", #
# AND ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT #
# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY #
# AND FITNESS FOR ANY PARTICULAR PURPOSE ARE DISCLAIMED. #
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, #
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL #
# DAMAGES, INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #
# SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, #
# OR BUSINESS INTERRUPTION, HOWEVER CAUSED, AND ON ANY #
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, #
# OR TORT, INCLUDING NEGLIGENCE OR OTHERWISE, ARISING IN #
# ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF #
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #
# #
#####################################################################
# OX153 makeweb 20210103A requires: POSIX sh, semver-tool >=3.2.0, #
# sponge >=20060219, pandoc >2.9.2, Tidy-HTML5 >=5.7.28, GNU find, #
# GNU xargs, GNU sed, POSIX cat, and a recent release of Git VCS. #
#####################################################################
#
#####################################################################
# #
# The following license applies to THIS TOOL (OX153 makeweb): #
# #
#####################################################################
#
##############################################################################
#
# The Oxford 153 Entitlement: Mark I. (OX153Mk1)
#
# LEGAL TERMS AND CONDITIONS FOR USE, COPYING, DISTRIBUTION, AND MODIFICATION
#
# All mankind is hereby permitted to use, copy, and distribute, verbatim or
# modified, copies of this tool, provided the maximum printable line length
# never exceeds the known universal constant of 153 characters, and the usage
# of the Oxford comma is forever retained in all documentation, tool comments,
# and tool output. Those who would not be considered to be part of mankind are
# hereby permitted to USE this tool, but NOT PERMITTED TO COPY, DISTRIBUTE, OR
# MODIFY this tool, UNDER ANY CIRCUMSTANCES. This tool is made available for
# use "AS IS", and without warranty of any kind, either expressed or implied.
#
# This license, henceforth known as the "Oxford 153 Entitlement", is NOT a
# GPL-compatible license, and this tool is NOT "free software", according to
# common and generally accepted definitions of "free software", including, but
# not limited to, the definition of "free software" provided by Richard M.
# Stallman, and, subsequently, the definitions asserted by the Free Software
# Foundation. As the Open Source Initiative has NOT reviewed this license, it
# is understood this tool CANNOT be considered "open source software" per the
# OSI Open Source Definition. This license is LIKELY INCOMPATIBLE with Debian
# Free Software Guidelines, and is EXPLICITLY INCOMPATIBLE with the Debian
# Social Contract, as the priorities of the authors of the tool will always
# trump the priorities of other users in the community. The authors of the
# tool are NOT associated with "Software in the Public Interest, Inc.", pay no
# membership dues, and do NOT receive any form of sponsorship from SPI.
#
# NOTICE: All uses of the Oxford comma within this tool are immutable,
# supported by miraculous revelations, and under no circumstances, alterable.
#
# WARNING: The maximum allowable length of any line within this tool is to be
# no more than 153 displayable characters. If one were to perform any action
# causing the length of the longest line to exceed, at any moment, the
# universal constant of 153 characters, they are hereby reminded that those
# whom the gods wish to destroy they first make mad, stealing away their minds
# of good sense, and turning their thoughts to foolishness.
#
##############################################################################

set -u ||
true
:
set -e ||
true
:
if [ ! -f "./README.md" ]; then
printf '%s\n' \
"Error: README.md not found" \
>&2
exit 1
fi
printf '%s ' \
"Converting markdown..."
grep -v "project/badge" ./README.md | pandoc -s --metadata title="OX153MkI" -r markdown -o public/index.html \
>/dev/null \
2>&1 ||
{
printf '%s\n' \
"Error: pandoc failed" \
>&2
exit 1
}
printf '%s\n' \
"ok" ||
true
:
printf '%s ' \
"Cleaning HTML..." ||
true
:
find "./public" -name '*.html' -exec \
tidy --add-meta-charset true -utf8 -w 76 -qiubnm \
"{}" \; \
2>/dev/null \
>/dev/null \
2>&1 ||
{
printf '%s\n' \
"Error: cleaning failed" \
>&2
exit 1
}
printf '%s\n' \
"ok" ||
true
:
printf '%s ' \
"Transforming HTML..." ||
true
:
find ./public -name '*.html' -print0 \
2>/dev/null |
xargs -0 -L1 -I{} \
sh -c \
'grep -iav ".*generator.*HTML.*Tidy.*>$" "{}" 2>/dev/null |
sponge "{}"
>/dev/null
2>&1' \
printf '%s\n' \
"Done" ||
true
:
printf '%s\n' \
"$(date)" \
>./.timestamp &&
git add ./.timestamp
:
printf '%s\n' \
"Preparing commit..." ||
true
:
git gc --aggressive --prune=now ||
true
:
SEMVER="$(eval printf '%s' "$(printf "%s" "$(semver-tool bump patch "$(printf '%d.%d.%d' "1" "0" "$(cut -d '.' -f 3 ./.patch |\
cut -d '.' -f 1)")") |\
sponge ./.patch")"; cat ./.patch)"
#git add -A && \
# git tag -s "${SEMVER:?}" -m "v${SEMVER:?} - $(date)" &&
# printf '%s\n' \
# "Set new semver tag: ${SEMVER}" &&\
# git commit -q -aS -m "Pushing Pages: $(date)" &&
# git pushall master &&
# printf '%s\n' "Complete."
69 changes: 69 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.7.28" />
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content=
"width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>OX153MkI</title>
<style>
<![CDATA[
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
]]>
</style><!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">OX153MkI</h1>
</header>
<h1 id="the-oxford-153-entitlement-mark-i.-ox153mk1">The Oxford 153
Entitlement: Mark I. (OX153MK1)</h1>
<hr />
<h2 id=
"legal-terms-and-conditions-for-use-copying-distribution-and-modification">
LEGAL TERMS AND CONDITIONS FOR USE, COPYING, DISTRIBUTION, AND
MODIFICATION</h2>
<p>All mankind is hereby permitted to use, copy, and distribute, verbatim
or modified, copies of this tool, provided the maximum printable line
length never exceeds the known universal constant of 153 characters, and
the usage of the Oxford comma is forever retained in all documentation,
tool comments, and tool output. Those who would not be considered to be
part of mankind are hereby permitted to USE this tool, but NOT PERMITTED
TO COPY, DISTRIBUTE, OR MODIFY this tool, UNDER ANY CIRCUMSTANCES. This
tool is made available for use "AS IS", and without warranty of any kind,
either expressed or implied.</p>
<p>This license, henceforth known as the "Oxford 153 Entitlement", is NOT
a GPL-compatible license, and this tool is NOT "free software", according
to common and generally accepted definitions of "free software",
including, but not limited to, the definition of "free software" provided
by Richard M. Stallman, and, subsequently, the definitions asserted by
the Free Software Foundation. As the Open Source Initiative has NOT
reviewed this license, it is understood this tool CANNOT be considered
"open source software" per the OSI Open Source Definition. This license
is LIKELY INCOMPATIBLE with Debian Free Software Guidelines, and is
EXPLICITLY INCOMPATIBLE with the Debian Social Contract, as the
priorities of the authors of the tool will always trump the priorities of
other users in the community. The authors of the tool are NOT associated
with "Software in the Public Interest, Inc.", pay no membership dues, and
do NOT receive any form of sponsorship from SPI.</p>
<h2 id="notice">NOTICE</h2>
<p>All uses of the Oxford comma within this tool are immutable, supported
by miraculous revelations, and under no circumstances, alterable.</p>
<h2 id="warning">WARNING</h2>
<p>The maximum allowable length of any line within this tool is to be no
more than 153 displayable characters. If one were to perform any action
causing the length of the longest line to exceed, at any moment, the
universal constant of 153 characters, they are hereby reminded that those
whom the gods wish to destroy they first make mad, stealing away their
minds of good sense, and turning their thoughts to foolishness.</p>
</body>
</html>

0 comments on commit d6fd19c

Please sign in to comment.