Skip to content

Commit

Permalink
fixed passing env vars in Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
godfryd committed Mar 21, 2021
1 parent fce9b6c commit a23945d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ end

task :github_release do
# create release entry
sh "curl -H 'Authorization: token $GITHUB_TOKEN' --fail --location --data '{\"tag_name\": \"v#{kk_ver}\"}' -o github-release-#{kk_ver}.json https://api.github.com/repos/kraken-ci/kraken/releases"
sh "curl -H \"Authorization: token $GITHUB_TOKEN\" --fail --location --data '{\"tag_name\": \"v#{kk_ver}\"}' -o github-release-#{kk_ver}.json https://api.github.com/repos/kraken-ci/kraken/releases"

# upload artifacts
file = File.read("github-release-#{kk_ver}.json")
rel = JSON.parse(file)
upload_url = rel['upload_url'].chomp('{?name,label}')
sh "curl -H 'Authorization: token $GITHUB_TOKEN' -H 'Content-Type:text/plain' --data-binary @kraken-docker-compose-#{kk_ver}.yaml '#{upload_url}?name=kraken-docker-compose-#{kk_ver}.yaml'"
sh "curl -H 'Authorization: token $GITHUB_TOKEN' -H 'Content-Type:text/plain' --data-binary @dot.env '#{upload_url}?name=kraken-#{kk_ver}.env'"
sh "curl -H \"Authorization: token $GITHUB_TOKEN\" -H 'Content-Type:text/plain' --data-binary @kraken-docker-compose-#{kk_ver}.yaml '#{upload_url}?name=kraken-docker-compose-#{kk_ver}.yaml'"
sh "curl -H \"Authorization: token $GITHUB_TOKEN\" -H 'Content-Type:text/plain' --data-binary @dot.env '#{upload_url}?name=kraken-#{kk_ver}.env'"
sh "rm -f github-release-#{kk_ver}.json"

# generate and set release notes
Expand Down

0 comments on commit a23945d

Please sign in to comment.