Skip to content

Commit

Permalink
Merge pull request #4 from pirafrank/dev
Browse files Browse the repository at this point in the history
bump version
  • Loading branch information
pirafrank committed May 6, 2024
2 parents 7fccfb2 + f14372a commit ca9ed6d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set .nvmrc content to stage output
id: nvmrc
Expand All @@ -32,6 +34,17 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Check git tag for version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "Current version in package.json: $PACKAGE_VERSION"
if git rev-parse "${PACKAGE_VERSION}" >/dev/null 2>&1; then
echo "Error: git tag ${PACKAGE_VERSION} already exists."
exit 1
else
echo "Good: no matching git tag exists for version ${PACKAGE_VERSION}"
fi
- name: Run tests
run: npm run test
env:
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": "@pirafrank/github-graphql-client",
"version": "0.1.2",
"version": "0.1.3",
"description": "Simple GitHub client to commit via their graphql APIs",
"main": "index.js",
"private": false,
Expand Down
10 changes: 9 additions & 1 deletion test.docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ docker run --rm \
github-graphql-client:latest "-v"

# commands below need GITHUB_TOKEN to be set.
source .env.sh
if [[ -f .env.sh ]]; then
echo "Sourcing .env.sh file"
source .env.sh
elif [[ ! -z "$GITHUB_TOKEN" ]]; then
echo "No .env.sh file set, reading GITHUB_TOKEN from environment"
else
echo "GITHUB_TOKEN not set and .env.sh does not exist. Exiting..."
exit 1
fi

echo "************ branch arg missing *******************"

Expand Down

0 comments on commit ca9ed6d

Please sign in to comment.