forked from grafana/worldmap-panel
-
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.
Add Makefile to assist in packaging and publishing
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# =================== | ||
# Package and publish | ||
# =================== | ||
|
||
package: | ||
npx grafana-toolkit plugin:ci-build | ||
npx grafana-toolkit plugin:ci-build --finish | ||
npx grafana-toolkit plugin:ci-package | ||
|
||
publish: check-tools check-token | ||
|
||
@# Before running this, export your GitHub access token. | ||
@#export GITHUB_TOKEN=8542f7c47b1697a79ab7f105e1d79f054d0b5599 | ||
|
||
@# Read version from "package.json". | ||
$(eval version=$(shell cat package.json | jq --raw-output .version)) | ||
|
||
@# Create release on GitHub. | ||
github-release release --user panodata --repo grafana-map-panel --tag $(version) || true | ||
|
||
@# Upload distribution package. | ||
$(eval distfile=ci/packages/grafana-map-panel-$(version).zip) | ||
github-release upload --user panodata --repo grafana-map-panel --tag $(version) --name $(notdir $(distfile)) --file $(distfile) | ||
|
||
|
||
check-tools: | ||
@jq --version >/dev/null 2>&1 || (echo 'ERROR: "jq" not found. Please install using "brew install jq" or download from https://github.com/stedolan/jq/releases.' && exit 1) | ||
@github-release --version >/dev/null 2>&1 || (echo 'ERROR: "github-release" not found. Please install using "brew install github-release" or download from https://github.com/github-release/github-release/releases.' && exit 1) | ||
|
||
check-token: | ||
@test -n "$(GITHUB_TOKEN)" || (echo 'ERROR: GITHUB_TOKEN environment variable not set.' && exit 1) |