From 989a73de6cb12b3d0464669ad4ca9b817ef34443 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 4 Jul 2020 00:39:29 +0900 Subject: [PATCH 1/4] add a script for release --- release.sh | 19 +++++++++++++++++++ xray/metadata.go | 13 +++---------- xray/version.go | 4 ++++ 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100755 release.sh create mode 100644 xray/version.go diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..235c0f2 --- /dev/null +++ b/release.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -uex + +CURRENT=$(cd "$(dirname "$0")" && pwd) +VERSION=$1 +MAJOR=$(echo "$VERSION" | cut -d. -f1) +MINOR=$(echo "$VERSION" | cut -d. -f2) +PATCH=$(echo "$VERSION" | cut -d. -f3) + +# update metadata +cat < "$CURRENT/xray/version.go" +package xray + +// Version records the current X-Ray Go SDK version. +const Version = "$MAJOR.$MINOR.$PATCH" +EOF +git add "$CURRENT/xray/version.go" +git commit -m "bump up v$MAJOR.$MINOR.$PATCH" diff --git a/xray/metadata.go b/xray/metadata.go index 1ebe1e0..fbf4988 100644 --- a/xray/metadata.go +++ b/xray/metadata.go @@ -6,19 +6,12 @@ import ( "github.com/shogo82148/aws-xray-yasdk-go/xray/schema" ) -// Version records the current X-Ray Go SDK version. -const Version = "0.0.4" - // Name records which X-Ray SDK customer uses. const Name = "X-Ray YA-SDK for Go" // ServiceData is the metadata of the user service. // It is used by all segments that X-Ray YA-SDK sends. -var ServiceData *schema.Service - -func init() { - ServiceData = &schema.Service{ - Compiler: runtime.Compiler, - CompilerVersion: runtime.Version(), - } +var ServiceData = &schema.Service{ + Compiler: runtime.Compiler, + CompilerVersion: runtime.Version(), } diff --git a/xray/version.go b/xray/version.go new file mode 100644 index 0000000..89a2ac7 --- /dev/null +++ b/xray/version.go @@ -0,0 +1,4 @@ +package xray + +// Version records the current X-Ray Go SDK version. +const Version = "1.0.0" From 40c4b2ec9c543dc4ac41f811962052c706ddd772 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 4 Jul 2020 00:45:45 +0900 Subject: [PATCH 2/4] git tag --- release.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release.sh b/release.sh index 235c0f2..d59ac27 100755 --- a/release.sh +++ b/release.sh @@ -17,3 +17,5 @@ const Version = "$MAJOR.$MINOR.$PATCH" EOF git add "$CURRENT/xray/version.go" git commit -m "bump up v$MAJOR.$MINOR.$PATCH" +git tag "v$MAJOR.$MINOR.$PATCH" +git push --tags From eb8401bef78a301dcc8965c1722b52257c207cc3 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 4 Jul 2020 00:46:17 +0900 Subject: [PATCH 3/4] go mod tidy --- go.sum | 2 -- xrayaws/go.sum | 2 -- 2 files changed, 4 deletions(-) diff --git a/go.sum b/go.sum index 72e0c25..50d0e6f 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= diff --git a/xrayaws/go.sum b/xrayaws/go.sum index c68e153..1750c0f 100644 --- a/xrayaws/go.sum +++ b/xrayaws/go.sum @@ -1,5 +1,3 @@ -github.com/aws/aws-sdk-go v1.32.12 h1:l/djCeLI4ggBFWLlYUGTqkHraoLnVMubNlLXPdEtoYc= -github.com/aws/aws-sdk-go v1.32.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.33.1 h1:yz9XmNzPshz/lhfAZvLfMnIS9HPo8+boGRcWqDVX+T0= github.com/aws/aws-sdk-go v1.33.1/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= From a2981f926b3c086f9c4ea69365e73da81d6d43e0 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Sat, 4 Jul 2020 00:48:41 +0900 Subject: [PATCH 4/4] add release script for sub-modules --- xrayaws-v2/release.sh | 11 +++++++++++ xrayaws/release.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100755 xrayaws-v2/release.sh create mode 100755 xrayaws/release.sh diff --git a/xrayaws-v2/release.sh b/xrayaws-v2/release.sh new file mode 100755 index 0000000..5c90e52 --- /dev/null +++ b/xrayaws-v2/release.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -uex + +VERSION=$1 +MAJOR=$(echo "$VERSION" | cut -d. -f1) +MINOR=$(echo "$VERSION" | cut -d. -f2) +PATCH=$(echo "$VERSION" | cut -d. -f3) + +git tag "xrayaws-v2/v$MAJOR.$MINOR.$PATCH" +git push --tags diff --git a/xrayaws/release.sh b/xrayaws/release.sh new file mode 100755 index 0000000..88248b4 --- /dev/null +++ b/xrayaws/release.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -uex + +VERSION=$1 +MAJOR=$(echo "$VERSION" | cut -d. -f1) +MINOR=$(echo "$VERSION" | cut -d. -f2) +PATCH=$(echo "$VERSION" | cut -d. -f3) + +git tag "xrayaws/v$MAJOR.$MINOR.$PATCH" +git push --tags