Skip to content

Commit

Permalink
Improved a bit the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherime committed Mar 12, 2023
1 parent 5b46eb8 commit 8e5bc99
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
*.out
*.so
*.test
build/
build/
output/
binary/
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
IMAGE_NAME = $(shell basename $(shell pwd))
TAG_LATEST = $(IMAGE_NAME):latest
TAG_DATE = $(IMAGE_NAME):$(shell date +"%Y-%m-%dT%H_%M")

.PHONY: all image binary timestamp clean

all: image build

image:
docker build . \
-t $(TAG_LATEST) \
-t $(TAG_DATE)

build:
mkdir -p binary
go build -a \
-gcflags=all="-l -B" \
-ldflags="-w -s" \
-o binary/$(IMAGE_NAME) \
./...

timestamp:
mkdir -p binary
go build -a \
-gcflags=all="-l -B" \
-ldflags="-w -s" \
-o binary/$(IMAGE_NAME)_$(shell date +"%Y-%m-%dT%H_%M") \
./...

clean:
rm -rf binary
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ go run ./...
### Run it as a Docker container

```bash
docker build -t w1-prometheus-exporter .
docker run -d -p 9740:9740 w1-prometheus-exporter
docker build -t workspaceone-prometheus-exporter .
docker run -d -p 9740:9740 workspaceone-prometheus-exporter
```

![Made with VHS](https://vhs.charm.sh/vhs-6Pw9hpjy1R6vGpvXpP5cAB.gif)

## Useful links

- [WorkspaceOne UEM API Reference](https://docs.vmware.com/en/VMware-Workspace-ONE-UEM/services/UEM_ConsoleBasics/GUID-BF20C949-5065-4DCF-889D-1E0151016B5A.html)
Expand Down
Binary file added assets/runOCI.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions tapes/runOCI.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Output assets/runOCI.gif

Set Theme "Dracula"
Set FontSize 15
Set Padding 20
Set Height 210

Type "docker build -t workspaceone-prometheus-exporter ."
Enter
Sleep 15s

Type "docker run -d -p 9740:9740 workspaceone-prometheus-exporter"
Enter
Sleep 3s

0 comments on commit 8e5bc99

Please sign in to comment.