Skip to content

Commit

Permalink
Add Mono for versioning and publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
unflxw committed Sep 27, 2024
1 parent 43cf92a commit a61aa5b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
Empty file added .changesets/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG=$(shell git describe --tags --abbrev=0 | tr -d v)
TAG=$(shell ./script/read_version.sh)

.PHONY: build push setup

Expand Down
13 changes: 13 additions & 0 deletions mono.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
language: "custom"
repo: "https://github.com/appsignal/appsignal-kubernetes/"
build:
command: "make build"
publish:
command: "script/read_version.sh && false"
test:
command: "cargo test"

read_version: "script/read_version.sh"
write_version: "script/write_version.sh"
version_scheme: "semver"
3 changes: 3 additions & 0 deletions script/read_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

grep -e '^version =' Cargo.toml | cut -d '"' -f 2
6 changes: 6 additions & 0 deletions script/write_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

VERSION=$1

sed -i '' -e 's/^version = ".*"$/version = "'$VERSION'"/' Cargo.toml
sed -i '' -e 's|image: appsignal/appsignal-kubernetes:.*$|image: appsignal/appsignal-kubernetes:'$VERSION'|' deployment.yaml

0 comments on commit a61aa5b

Please sign in to comment.