From 427dd22935270d253b586248d45f69de05331438 Mon Sep 17 00:00:00 2001 From: Jeevanandam M Date: Fri, 20 Jul 2018 23:54:50 -0700 Subject: [PATCH 1/2] publish script update --- aah/publish_cli.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aah/publish_cli.sh b/aah/publish_cli.sh index 03aab10..ef0e8d0 100755 --- a/aah/publish_cli.sh +++ b/aah/publish_cli.sh @@ -14,17 +14,17 @@ echo "Publish for version: $version" # Build for macOS echo "Starting aah CLI build for macOS" -build_dir="/tmp/aah_cli_mac_$version" +build_dir="/tmp/aah-cli-mac-$version" mkdir -p $build_dir env GOOS=darwin GOARCH=amd64 go build -o $build_dir/aah -ldflags="-s -w -X main.CliPackaged=true" -cd $build_dir && zip aah_darwin_amd64.zip aah +cd $build_dir && zip aah-darwin-amd64.zip aah # sha256 and upload to aah server -sha256=$(/usr/bin/shasum -a 256 $build_dir/aah_darwin_amd64.zip | cut -d " " -f 1) +sha256=$(/usr/bin/shasum -a 256 $build_dir/aah-darwin-amd64.zip | cut -d " " -f 1) echo "sha256 $sha256" echo "Uploading aah CLI macOS binary to aah server" ssh root@aahframework.org "mkdir -p /srv/www/aahframework.org/public/releases/cli/$version" -scp $build_dir/aah_darwin_amd64.zip root@aahframework.org:/srv/www/aahframework.org/public/releases/cli/$version +scp $build_dir/aah-darwin-amd64.zip root@aahframework.org:/srv/www/aahframework.org/public/releases/cli/$version # update homebrew tap echo "Updating Homebrew Tap for macOS" @@ -32,7 +32,7 @@ if [ ! -d "$GOPATH/src/github.com/go-aah/homebrew-tap" ]; then git clone git@github.com:go-aah/homebrew-tap.git $GOPATH/src/github.com/go-aah/homebrew-tap fi cd $GOPATH/src/github.com/go-aah/homebrew-tap -sed -i '' -e 's/cli\/.*\/aah_darwin_amd64.zip/cli\/'"$version"'\/aah_darwin_amd64.zip/g' ./Formula/aah.rb +sed -i '' -e 's/cli\/.*\/aah-darwin-amd64.zip/cli\/'"$version"'\/aah-darwin-amd64.zip/g' ./Formula/aah.rb sed -i '' -e 's/sha256 ".*"/sha256 "'"$sha256"'"/g' ./Formula/aah.rb sed -i '' -e 's/version ".*"/version "'"$version"'"/g' ./Formula/aah.rb git add -u && git commit -m "brew tap update with $version release" && git push From 37e23ab95ff529f4dff42d7a0002a17c93fb98f6 Mon Sep 17 00:00:00 2001 From: Jeevanandam M Date: Sat, 18 Aug 2018 13:05:22 -0700 Subject: [PATCH 2/2] go-aah/aah#211 fixed init.go file generate for aah v0.10.x and below --- aah/new.go | 13 ++++++++----- aah/version.go | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/aah/new.go b/aah/new.go index 8bad277..dfdf7bc 100644 --- a/aah/new.go +++ b/aah/new.go @@ -497,11 +497,14 @@ func isAuthSchemeSupported(authScheme string) bool { func checkAndGenerateInitgoFile(importPath, baseDir string) { initGoFile := filepath.Join(baseDir, "app", "init.go") if !ess.IsFileExists(initGoFile) { - cliLog.Warn("***** In v0.10 'init.go' file introduced to evolve aah framework." + - " Since its not found, generating 'init.go' file. Please add it to your version control. *****\n") + cliLog.Warn("***** In aah v0.10 'init.go' file introduced to evolve aah framework." + + " Since its not found, generating 'init.go' file. Please add 'init.go' into VCS. *****\n") - aahToolsPath := aahToolsPath() - appTemplatePath := filepath.Join(aahToolsPath.Dir, "app-template") + appTmplBaseDir := inferAppTmplBaseDir() + if ess.IsStrEmpty(appTmplBaseDir) { + aahToolsPath := aahToolsPath() + appTmplBaseDir = filepath.Join(aahToolsPath.Dir, "app-template") + } appType := typeAPI if ess.IsFileExists(filepath.Join(baseDir, "views")) { appType = typeWeb @@ -514,7 +517,7 @@ func checkAndGenerateInitgoFile(importPath, baseDir string) { } processFile(baseDir, file{ - src: filepath.Join(appTemplatePath, "app", "init.go.atmpl"), + src: filepath.Join(appTmplBaseDir, "app", "init.go.atmpl"), dst: filepath.Join(baseDir, "app", "init.go"), }, data) } diff --git a/aah/version.go b/aah/version.go index 249125a..641cace 100644 --- a/aah/version.go +++ b/aah/version.go @@ -17,7 +17,7 @@ import ( ) // Version no. of aah framework CLI tool -const Version = "0.12.1" +const Version = "0.12.2" var ( errVersionNotExists = errors.New("version not exists")