Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Feb 26, 2024
2 parents f4791f3 + 4ea177d commit 50dfb4a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'v*'

jobs:
test-code:
test_code:
runs-on: ubuntu-latest
steps:
- name: "Install dependencies"
Expand All @@ -33,10 +33,10 @@ jobs:
env:
TEST_NAME: "Unit Tests"
run: |-
TESTS_OK=1
set +e
set -o pipefail
go test ./... 2>&1 | tee test-results.txt
set -e
S=$? #non-0 means error
if [ $S -eq 0 ]; then
R="Test(s) Passed: ${TEST_NAME}"
Expand All @@ -46,9 +46,20 @@ jobs:
R="Test(s) '${TEST_NAME}' failed"
echo "::error::$R"
R=":x: $R"
TESTS_OK=0
fi
set -e
echo "### ${R}" >> $GITHUB_STEP_SUMMARY
echo '---' >> $GITHUB_STEP_SUMMARY
echo '```shell' >> $GITHUB_STEP_SUMMARY
cat test-results.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
if [[ "${TESTS_OK}" == "0" ]]; then
exit 1
fi
tag-branch:
needs: [test_code]
uses: ./.github/workflows/util-tag-branch.yml
secrets: inherit
3 changes: 2 additions & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
# limit to only first 3 chars
VER_BUILD=${VER_BUILD:0:3}
# 'strict' semver segments cannot start with 0
VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d).${VER_BUILD#0}"
VERSION_NUM="0.$(date +%y)$(date +%m).$(date +%-d).${VER_BUILD#0}"
echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
# recreate as INT, leaving 0's in place; creates a 'reasonable' 32-bit signed int.
VERSION_INT="$(date +%y)$(date +%m)$(date +%d)${VER_BUILD}"
echo "VERSION_INT=${VERSION_INT}" >> $GITHUB_OUTPUT
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/util-tag-branch.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: "Create version tag"

on: [workflow_dispatch]
on: [workflow_call]

jobs:
tag-branch:
runs-on: ubuntu-latest
environment: default
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_REF }}

- name: "Create Version Tag"
id: version_cfg
Expand All @@ -20,7 +18,7 @@ jobs:
# limit to only first 3 chars
VER_BUILD=${VER_BUILD:0:3}
# 'strict' semver segments cannot start with 0
VERSION_NUM="$(date +%y).$(date +%-m).$(date +%-d).${VER_BUILD#0}"
VERSION_NUM="0.$(date +%y)$(date +%m).$(date +%-d).${VER_BUILD#0}"
echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
# recreate as INT, leaving 0's in place; creates a 'reasonable' 32-bit signed int.
VERSION_INT="$(date +%y)$(date +%m)$(date +%d)${VER_BUILD}"
Expand Down
2 changes: 1 addition & 1 deletion utils/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var wordTokenRegex = wordTokenRegexPattern()
func wordTokenRegexPattern() *regexp.Regexp {
thePattern, ok := os.LookupEnv("WordTokenRegex")
if !ok || thePattern == "" {
thePattern = `[\pM\pL\pN_'-]+|\pS`
thePattern = `[\pM\pL\pN_']+|\pS`
}
return regexp.MustCompile(thePattern)
}
Expand Down

0 comments on commit 50dfb4a

Please sign in to comment.