...

Text file src/github.com/miekg/pkcs11/Makefile.release

Documentation: github.com/miekg/pkcs11

     1# Makefile for releasing.
     2#
     3# The release is controlled from version.go. The version found there is
     4# used to tag the git repo, we're not building any artifects so there is nothing
     5# to upload to github.
     6#
     7# * Up the version in version.go
     8# * Run: make -f Makefile.release release
     9#   * will *commit* your change with 'Release $VERSION'
    10#   * push to github
    11#
    12
    13define GO
    14//+build ignore
    15
    16package main
    17
    18import (
    19	"fmt"
    20
    21	"github.com/miekg/pkcs11"
    22)
    23
    24func main() {
    25	fmt.Println(pkcs11.Release.String())
    26}
    27endef
    28
    29$(file > version_release.go,$(GO))
    30VERSION:=$(shell go run -tags release version_release.go)
    31TAG="v$(VERSION)"
    32
    33all:
    34	rm -f version_release.go
    35	@echo Use the \'release\' target to start a release $(VERSION)
    36
    37.PHONY: run
    38run:
    39	rm -f version_release.go
    40	@echo $(VERSION)
    41
    42.PHONY: release
    43release: commit push
    44	@echo Released $(VERSION)
    45
    46.PHONY: commit
    47commit:
    48	rm -f version_release.go
    49	@echo Committing release $(VERSION)
    50	git commit -am"Release $(VERSION)"
    51	git tag $(TAG)
    52
    53.PHONY: push
    54push:
    55	@echo Pushing release $(VERSION) to master
    56	git push --tags
    57	git push

View as plain text