Fix chart tar command

pull/4/head
Alexander Matyushentsev 2017-10-11 13:25:53 -07:00
parent a0959ed344
commit 5456fd1e8b
2 changed files with 1 additions and 15 deletions

View File

@ -1,14 +0,0 @@
require 'yaml'
require 'pathname'
root_dir = Pathname.new("#{File.dirname(__FILE__)}/..").cleanpath
`mkdir -p #{root_dir}/output`
list = Dir.glob("#{root_dir}/charts/**/*Chart.yaml")
list.each do |filename|
chart_name = File.basename(File.dirname(filename))
`tar -cvzf #{root_dir}/output/#{chart_name}-#{version_info['version']}.tgz #{File.dirname(filename)} -C #{File.dirname(filename)} .`
`helm repo index #{root_dir}/output`
end

View File

@ -8,6 +8,6 @@ for dir in $SRCROOT/charts/*;
do
echo "Processing $dir"
version=$(cat $dir/Chart.yaml | grep version: | awk '{print $2}')
tar -cvzf $SRCROOT/output/$(basename $dir)-$version.tgz $dir -C $dir .
tar -cvzf $SRCROOT/output/$(basename $dir)-$version.tgz -C $dir .
cd $SRCROOT/output && helm repo index .
done