Skip to content

Commit

Permalink
updated make set_version to generate pack.sh.
Browse files Browse the repository at this point in the history
Rnning `pack.sh` runs `make release` with the correct version numbers for release.
After making a new version:
* update the version number in the `Makefile`.
* Run `make set_version`
* Commit your changes in git
* Tag your version with `make tag`
* package release files with ./pack.sh
  • Loading branch information
MelonSmasher committed Nov 7, 2019
1 parent e243fbb commit 561030e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/browserbeat.test
*.pyc
build/
pack.sh
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,23 @@ git-add:
git add -A
git commit -m "Add generated browserbeat files"

BEAT_URL=https://${BEAT_PATH}

BEAT_VERSION=0.0.1
VERSION_QUALIFIER=alpha1
VERSION_GOFILEPATH=${BEAT_PATH}/version/version.go

VERSION=${BEAT_VERSION}-${VERSION_QUALIFIER}
VERSION_GOFILEPATH=${BEAT_PATH}/version/version.go

BEAT_URL=https://${BEAT_PATH}

set_version: ## @packaging VERSION=x.y.z set the version of the beat to x.y.z
## @packaging VERSION=x.y.z set the version of the beat to x.y.z
## Override the built in set_version cmd
set_version:
dev-tools/set_version ${VERSION}
$(shell cp ./pack.sh.example ./pack.sh)
$(shell chmod +x ./pack.sh)
$(shell sed -i 's/0.0.0/${BEAT_VERSION}/g' ./pack.sh)
$(shell sed -i 's/alpha/${VERSION_QUALIFIER}/g' ./pack.sh)

tag:
$(shell git tag v${VERSION})

# Ugly AF
pack:
$(shell BEAT_VERSION=${BEAT_VERSION} VERSION_QUALIFIER=${VERSION_QUALIFIER} VERSION=${VERSION} make release BEAT_VERSION=${BEAT_VERSION} VERSION_QUALIFIER=${VERSION_QUALIFIER} VERSION=${VERSION})
7 changes: 7 additions & 0 deletions pack.sh.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

BEAT_VERSION=0.0.0
VERSION_QUALIFIER=alpha
VERSION=${BEAT_VERSION}-${VERSION_QUALIFIER}

BEAT_VERSION=${1} VERSION_QUALIFIER=${2} VERSION=${3} make release

0 comments on commit 561030e

Please sign in to comment.