Skip to content

Commit

Permalink
Merge v0.4.0 updates (#610)
Browse files Browse the repository at this point in the history
* Amp cleanup (#603)

* Fix for issues #547,#561,#565

* minor cleanup

* updated changelog for AMP 0.4.0 (#602)

* updated changelog for 0.4.0 (partial)

* add fr changelog

* add jgj changelog

* added nv changelog

* add missing changelog for 0.3.0
  • Loading branch information
subfuzion authored Dec 30, 2016
1 parent 0e027e2 commit 3eef002
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 15 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,68 @@

## 0.4.0

### Client

* Configuration file moved to $HOME/.config/amp/amp.yaml [#592](https://github.com/appcelerator/amp/pull/592)
* Fix registry commands [#536](https://github.com/appcelerator/amp/pull/536)
* add amp platform command [#455](https://github.com/appcelerator/amp/pull/455)
* AMP version option [#462](https://github.com/appcelerator/amp/pull/462), [#589](https://github.com/appcelerator/amp/pull/589)
* AMP kv commands [#511](https://github.com/appcelerator/amp/pull/511)

### Platform

* Grafana 4.0 [#518](https://github.com/appcelerator/amp/pull/518)
* Influxdata stack version 1.1 [#443](https://github.com/appcelerator/amp/pull/443), [#474](https://github.com/appcelerator/amp/pull/474)
* Robustness [#442](https://github.com/appcelerator/amp/pull/442), [#443](https://github.com/appcelerator/amp/pull/443), [#476](https://github.com/appcelerator/amp/pull/476)
* grpc code consistency [#586](https://github.com/appcelerator/amp/pull/586) [#585](https://github.com/appcelerator/amp/pull/585) [#584](https://github.com/appcelerator/amp/pull/584) [#583](https://github.com/appcelerator/amp/pull/583)
* Fix amp stats panic [#533](https://github.com/appcelerator/amp/pull/533) [#534](https://github.com/appcelerator/amp/pull/534)
* add cli color theme [#495](https://github.com/appcelerator/amp/pull/495)
* Fix stats issues [#404](https://github.com/appcelerator/amp/pull/404) [#403](https://github.com/appcelerator/amp/pull/403)

### Vendoring

* Global update of vendors, based on tags instead of commits [#501](https://github.com/appcelerator/amp/pull/501), [#515](https://github.com/appcelerator/amp/pull/515)

### Documentation

* Documentation Update [#601](https://github.com/appcelerator/amp/pull/601)
* amp platform commands doc [#473](https://github.com/appcelerator/amp/pull/473)
* add stacks user guide [#391](https://github.com/appcelerator/amp/pull/391)

### Tests

* Dockerized integration tests [#479](https://github.com/appcelerator/amp/pull/479)
* refactor rpc tests [#416](https://github.com/appcelerator/amp/pull/416)
* improve stats tests [#405](https://github.com/appcelerator/amp/pull/405)
* CLI tests
* Synchronous setup and tearDown [#522](https://github.com/appcelerator/amp/pull/522)
* Asynchronous execution [#454](https://github.com/appcelerator/amp/pull/454)
* Templating regexes [#478](https://github.com/appcelerator/amp/pull/478)
* Templating ports [#441](https://github.com/appcelerator/amp/pull/441) [#445](https://github.com/appcelerator/amp/pull/445)
* Updated Timeout and delay values [#451](https://github.com/appcelerator/amp/pull/451)
* AMP kv commands [#511](https://github.com/appcelerator/amp/pull/511)
* Improved Regex [#544](https://github.com/appcelerator/amp/pull/544)

## 0.3.0 (2016-11-08)

### Client

* AMP config get and set [#420](https://github.com/appcelerator/amp/pull/420)

### Platform

* InfluxData and Grafana images are now specialized for AMP [#394](https://github.com/appcelerator/amp/pull/394)

### Tests

* Refactored CLI tests [#386](https://github.com/appcelerator/amp/pull/386), [#398](https://github.com/appcelerator/amp/pull/398)
* Regexp for tests [#383](https://github.com/appcelerator/amp/pull/383), [#387](https://github.com/appcelerator/amp/pull/387), [#397](https://github.com/appcelerator/amp/pull/397)
* Timeout, retry and delay in CLI tests [#421](https://github.com/appcelerator/amp/pull/421)
* Test coverage [#396](https://github.com/appcelerator/amp/pull/396)

### Documentation

* Stack documentation [#390](https://github.com/appcelerator/amp/pull/390), [#391](https://github.com/appcelerator/amp/pull/391)

## 0.2.2 (2016-10-25)

Expand Down
17 changes: 14 additions & 3 deletions cmd/amp/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"encoding/json"
"fmt"
"log"
"strconv"
Expand All @@ -15,20 +16,30 @@ func init() {
// configCmd represents the Config command
configCmd := &cobra.Command{
Use: "config",
Short: "Display the current configuration",
Long: `Display the current configuration.`,
Short: "Display or update the current configuration",
Long: `No arguments: display the current configuration.
One argument: display the configuration key value.
Two arguments: set the key to the value.`,
Run: func(cmd *cobra.Command, args []string) {
switch len(args) {
case 0:
fmt.Println(Config)
// Display the full configuration
j, err := json.MarshalIndent(structs.Map(Config), "", " ")
if err != nil {
fmt.Println("error: ", err)
} else {
fmt.Println(string(j))
}
case 1:
// Display key
s := structs.New(Config)
f, ok := s.FieldOk(strings.Title(args[0]))
if !ok {
log.Fatalf("Field %s not found", strings.Title(args[0]))
}
fmt.Println(f.Value())
case 2:
// Update key
s := structs.New(Config)
f, ok := s.FieldOk(strings.Title(args[0]))
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion cmd/amp/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
var loginCmd = &cobra.Command{
Use: "login",
Short: "Login via GitHub",
Long: `Create a github access token and store it in your Config file to authenticate further commands.`,
Long: `Create a GitHub access token and store it in your Config file to authenticate further commands.`,
RunE: func(cmd *cobra.Command, args []string) error {
err := AMP.Connect()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/amp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func main() {
RootCmd.SetUsageTemplate(usageTemplate)
RootCmd.SetHelpTemplate(helpTemplate)

RootCmd.PersistentFlags().StringVar(&configFile, "config", "", "Config file (default is $HOME/.amp.yaml)")
RootCmd.PersistentFlags().StringVar(&configFile, "config", "", "Config file (default is $HOME/.config/amp/amp.yaml)")
RootCmd.PersistentFlags().BoolVar(&displayConfigFilePath, "config-file", false, "Display the location of the config file used (if any)")
RootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Verbose output")
RootCmd.PersistentFlags().StringVar(&serverAddr, "server", "", "Server address")
Expand Down
4 changes: 2 additions & 2 deletions cmd/amp/platform_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ var PlatformPull = &cobra.Command{
}

func init() {
PlatformPull.Flags().BoolP("silence", "s", false, "No console output at all")
PlatformPull.Flags().BoolP("quiet", "q", false, "Suppress terminal output")
PlatformPull.Flags().BoolP("local", "l", false, "Use local amp image")
PlatformCmd.AddCommand(PlatformPull)
}

func pullAMPImages(cmd *cobra.Command, args []string) error {
manager := &ampManager{}
if cmd.Flag("silence").Value.String() == "true" {
if cmd.Flag("quiet").Value.String() == "true" {
manager.silence = true
}
if cmd.Flag("verbose").Value.String() == "true" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/amp/platform_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ var PlatformStart = &cobra.Command{

func init() {
PlatformStart.Flags().BoolP("force", "f", false, "Start all possible services, do not stop on error")
PlatformStart.Flags().BoolP("silence", "s", false, "No console output at all")
PlatformStart.Flags().BoolP("quiet", "q", false, "Suppress terminal outpu")
PlatformStart.Flags().BoolP("local", "l", false, "Use local amp image")
PlatformCmd.AddCommand(PlatformStart)
}

func startAMP(cmd *cobra.Command, args []string) error {
manager := &ampManager{}
if cmd.Flag("silence").Value.String() == "true" {
if cmd.Flag("quiet").Value.String() == "true" {
manager.silence = true
}
if cmd.Flag("force").Value.String() == "true" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/amp/platform_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ var PlatformStatus = &cobra.Command{
}

func init() {
PlatformStatus.Flags().BoolP("silence", "s", false, "No console output at all")
PlatformStatus.Flags().BoolP("quiet", "q", false, "Suppress terminal output")
PlatformStatus.Flags().BoolP("local", "l", false, "Use local amp image")
PlatformCmd.AddCommand(PlatformStatus)
}

func getAMPStatus(cmd *cobra.Command, args []string) error {
manager := &ampManager{}
if cmd.Flag("silence").Value.String() == "true" {
if cmd.Flag("quiet").Value.String() == "true" {
manager.silence = true
}
if cmd.Flag("verbose").Value.String() == "true" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/amp/platform_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ var PlatformStop = &cobra.Command{
}

func init() {
PlatformStop.Flags().BoolP("silence", "s", false, "No console output at all")
PlatformStop.Flags().BoolP("quiet", "q", false, "Suppress terminal output")
PlatformStop.Flags().BoolP("local", "l", false, "Use local amp image")
PlatformCmd.AddCommand(PlatformStop)
}

func stopAMP(cmd *cobra.Command, args []string) error {
manager := &ampManager{}
if cmd.Flag("silence").Value.String() == "true" {
if cmd.Flag("quiet").Value.String() == "true" {
manager.silence = true
}
if cmd.Flag("verbose").Value.String() == "true" {
Expand Down
3 changes: 1 addition & 2 deletions cmd/amp/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ func RegistryPush(amp *client.AMP, cmd *cobra.Command, args []string) error {
hostname, name := distreference.SplitHostname(distributionRef)

if amp.Verbose() {
fmt.Println("Registry push request with:")
fmt.Printf(" image: %s\n", image)
fmt.Printf("Registry push request with:\n image: %s\n", image)
}

taggedImage := image
Expand Down

0 comments on commit 3eef002

Please sign in to comment.