-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
35 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,20 +24,18 @@ jobs: | |
run: | | ||
git config user.name "$AUTHOR" | ||
git config user.email "<$EMAIL>" | ||
TAG=$(./get-version.sh manifest.json) | ||
TAG=$(make version) | ||
git tag -a $TAG -m "Release $TAG" | ||
git push --tags | ||
echo TAG=${TAG} >> $GITHUB_ENV | ||
- name: Build tarball | ||
run: | | ||
tarball=common-utils-${{ env.TAG }}.tar.gz | ||
sudo apt install -y pandoc | ||
./package-utils.sh ${tarball} | ||
echo TARBALL=${tarball} >> $GITHUB_ENV | ||
make package | ||
- uses: ncipollo/[email protected] | ||
with: | ||
tag: ${{ env.TAG }} | ||
generateReleaseNotes: true | ||
artifacts: ${{ env.TARBALL }} | ||
artifacts: common-utils-${{ env.TAG }}.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Upon pushing to the main branch it runs all tests. | ||
# | ||
# Copyright (c) 2022 AlertAvert.com. All rights reserved. | ||
# Copyright (c) 2020-2023 AlertAvert.com. All rights reserved. | ||
# Author: Marco Massenzio ([email protected]) | ||
# | ||
name: Build & Test | ||
name: Execute Tests | ||
|
||
on: | ||
push: | ||
|
@@ -25,10 +25,5 @@ jobs: | |
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: pip install pytest pytest-md | ||
- uses: pavelzw/pytest-action@v2 | ||
with: | ||
emoji: false | ||
verbose: false | ||
job-summary: true | ||
- name: Run tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,16 @@ | |
# | ||
# Author: Marco Massenzio ([email protected]) | ||
|
||
TESTDIR := tests | ||
TESTDIR := parse-args | ||
VERSION = $(shell ./scripts/get-version.sh manifest.json) | ||
TARBALL := common-utils-$(VERSION).tar.gz | ||
|
||
package: | ||
./package.sh $(TARBALL) | ||
|
||
test: | ||
@echo "--- Running tests in the ${TESTDIR} directory" | ||
python -m unittest discover -s ${TESTDIR} | ||
|
||
version: | ||
@echo $(VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version" : "0.8.0", | ||
"version" : "0.9.0", | ||
"metadata": { | ||
"author": "[email protected]", | ||
"comment": "Common utilities for Shell Scripts" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
# Author: Marco Massenzio ([email protected]) | ||
# | ||
set -eu | ||
source utils.sh | ||
source scripts/utils.sh | ||
|
||
declare -r TARBALL=${1:-} | ||
if [[ -z ${TARBALL} ]] | ||
|
@@ -22,15 +22,16 @@ declare -r DEST=$(mktemp -d) | |
declare -r BASE=$(abspath $(dirname $0)) | ||
|
||
pushd ${BASE} | ||
for f in build parse-args runtests utils get-version; do | ||
cp $f.* ${DEST}/$f | ||
for f in build get-version parse-args runtests utils ; do | ||
cp scripts/$f.sh ${DEST}/$f | ||
chmod +x $DEST/$f | ||
done | ||
cp -r commons.cmake parse_args.py templates/ $DEST/ | ||
cp -r templates/ $DEST/ | ||
cp parse-args/parse_args.py $DEST/ | ||
|
||
# Generate HTML instructions. | ||
pandoc README.md -t html -o /tmp/README.html | ||
cat head.html /tmp/README.html >${DEST}/README.html | ||
cat head.html /tmp/README.html tail.html >${DEST}/README.html | ||
popd | ||
|
||
tar cf ${TARBALL} -C ${DEST} . | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,6 @@ | |
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Author: Marco Massenzio ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Author: Marco Massenzio ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Author: Marco Massenzio ([email protected]) | ||
|
||
import argparse | ||
import unittest | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
</div> | ||
</body> | ||
</html><!-- | ||
~ Copyright (c) 2020-2023 AlertAvert.com. All rights reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Author: Marco Massenzio ([email protected]) | ||
--> | ||
</html> |
File renamed without changes.