Skip to content

Commit

Permalink
bump version to 7.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvz committed Nov 25, 2020
1 parent 2d6a7e1 commit b90e495
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
7 changes: 4 additions & 3 deletions beater/api/root/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (

"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/monitoring"
"github.com/elastic/beats/v7/libbeat/version"
beatversion "github.com/elastic/beats/v7/libbeat/version"

"github.com/elastic/apm-server/beater/request"
"github.com/elastic/apm-server/version"
)

var (
Expand All @@ -40,8 +41,8 @@ var (
//TODO: only allow GET, HEAD requests (breaking change)
func Handler() request.Handler {
serverInfo := common.MapStr{
"build_date": version.BuildTime().Format(time.RFC3339),
"build_sha": version.Commit(),
"build_date": beatversion.BuildTime().Format(time.RFC3339),
"build_sha": beatversion.Commit(),
"version": version.GetDefaultVersion(),
}

Expand Down
5 changes: 3 additions & 2 deletions beater/api/root/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/beats/v7/libbeat/version"
beatversion "github.com/elastic/beats/v7/libbeat/version"

"github.com/elastic/apm-server/beater/authorization"
"github.com/elastic/apm-server/beater/beatertest"
"github.com/elastic/apm-server/beater/config"
"github.com/elastic/apm-server/version"
)

func TestRootHandler(t *testing.T) {
Expand Down Expand Up @@ -69,7 +70,7 @@ func TestRootHandler(t *testing.T) {

assert.Equal(t, http.StatusOK, w.Code)
body := fmt.Sprintf("{\"build_date\":\"0001-01-01T00:00:00Z\",\"build_sha\":\"%s\",\"version\":\"%s\"}\n",
version.Commit(), version.GetDefaultVersion())
beatversion.Commit(), version.GetDefaultVersion())
assert.Equal(t, body, w.Body.String())
})
}
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (

"github.com/elastic/apm-server/idxmgmt"
_ "github.com/elastic/apm-server/include" // include assets
"github.com/elastic/apm-server/version"
)

const (
Expand Down Expand Up @@ -81,7 +82,7 @@ func NewRootCommand(newBeat beat.Creator) *cmd.BeatsRootCmd {
settings := instance.Settings{
Name: beatName,
IndexPrefix: apmIndexPattern,
Version: defaultBeatVersion,
Version: version.GetDefaultVersion(),
RunFlags: runFlags,
Monitoring: report.Settings{
DefaultUsername: "apm_system",
Expand Down
3 changes: 2 additions & 1 deletion elasticsearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ import (

"go.elastic.co/apm/module/apmelasticsearch"

"github.com/elastic/apm-server/version"

"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/version"
esv7 "github.com/elastic/go-elasticsearch/v7"
"github.com/elastic/go-elasticsearch/v7/esapi"
esv8 "github.com/elastic/go-elasticsearch/v8"
Expand Down
9 changes: 7 additions & 2 deletions cmd/version.go → version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
// specific language governing permissions and limitations
// under the License.

package cmd
package version

// name matches github.com/elastic/beats/v7/dev-tools/mage/settings.go parseBeatVersion
const defaultBeatVersion = "7.10.1"
const defaultBeatVersion = "7.10.2"

func GetDefaultVersion() string {
// TODO replicate the libbeat logic (ie version qualifier)
return defaultBeatVersion
}

0 comments on commit b90e495

Please sign in to comment.