Skip to content

Commit

Permalink
Merge pull request #60 from mattpolzin/version-bump
Browse files Browse the repository at this point in the history
add a check for TODOs in the source code and bump the version to 1.0.0
  • Loading branch information
mattpolzin authored Jul 16, 2022
2 parents 56223be + 654ff26 commit 996743c
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

name: Checks

on:
pull_request:

jobs:
check-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check versions
run: ./version-check.sh

check-todos:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check todos
run: ./todo-check.sh
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ harmony: build

package: build
./version-check.sh
./todo-check.sh
# leave ./harmony in place
mkdir harmony-npm
cp harmony ./harmony-npm
Expand Down
2 changes: 1 addition & 1 deletion harmony.ipkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package harmony
version = 0.7.1
version = 1.0.0
authors = "Mathew Polzin"
license = "MIT"
-- brief =
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mattpolzin/harmony",
"version": "0.7.1",
"version": "1.0.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion src/AppVersion.idr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module AppVersion

export
appVersion : String
appVersion = "0.7.1"
appVersion = "1.0.0"

export
printVersion : HasIO io => io ()
Expand Down
2 changes: 2 additions & 0 deletions src/System/File/Node.idr
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module System.File.Node

-- TODO: Remove this once Idris2 gains a version newer than 0.5.1. This has been added to the base library.

%foreign "node:lambda:(f) => require('fs').unlinkSync(f)"
prim__removeFile : String -> PrimIO ()

Expand Down
2 changes: 2 additions & 0 deletions src/System/Node.idr
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module System.Node

-- TODO: Remove this once Idris2 gains a version newer than 0.5.1. This has been added to the base library.

%foreign "node:lambda:(cmd) => require('child_process').spawnSync(cmd, [], {shell: true, stdio: 'inherit'}).status"
prim__system : String -> PrimIO Int

Expand Down
2 changes: 2 additions & 0 deletions src/System/Random/Node.idr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Data.List

%default total

-- TODO: Remove this once Idris2 gains a version newer than 0.5.1. This has been added to the base library.

%foreign "node:lambda:() => Math.random()"
prim__rnd : PrimIO Double

Expand Down
20 changes: 20 additions & 0 deletions todo-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#/bin/sh

todos=$(find . \( -name '*.idr' -o -name '*.js' \) ! -path '*build*' ! -path '*node_modules*' | xargs sed -n '/TODO/p')

pkgversion="$(cat harmony.ipkg | sed -n 's/version = \(.*\)/\1/p')"

if [[ "$todos" != '' ]]; then
echo "TODOs found:"
echo "$todos"

criticals="$(echo "$todos" | sed -n "/TODO $pkgversion/p")"

if [[ "$criticals" != '' ]]; then
echo ""
echo "Cannot proceeed with critical TODOs for the current version number:"
echo "$criticals"
exit 1
fi
fi

0 comments on commit 996743c

Please sign in to comment.