Skip to content

Commit

Permalink
Merge pull request #10 from appsignal/add-mono-versioning
Browse files Browse the repository at this point in the history
Add Mono for publishing
  • Loading branch information
unflxw authored Oct 1, 2024
2 parents 43cf92a + 33ccccd commit dd3649b
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: "make push"
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 dd3649b

Please sign in to comment.