Permalink
Browse files

pass VERSION to docker

  • Loading branch information...
1 parent be4ed16 commit 3a27631c47e75310a63ce0bd134e5eab5b8fa2c2 @pastak pastak committed Nov 6, 2015
Showing with 3 additions and 2 deletions.
  1. +1 −1 rpm_docker.sh
  2. +2 −1 rpm_release.rb
View
@@ -2,4 +2,4 @@
sudo service docker start
docker build -t gyazo/build:latest .
-docker run -e PACKAGECLOUD_TOKEN=$PACKAGECLOUD_TOKEN gyazo/build ruby /tmp/build/rpm_release.rb
+docker run -e PACKAGECLOUD_TOKEN=$PACKAGECLOUD_TOKEN -e VERSION=$VERSION gyazo/build ruby /tmp/build/rpm_release.rb
View
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
require 'json'
TOKEN = ENV['PACKAGECLOUD_TOKEN']
+VERSION = ENV['VERSION']
body = `curl -u #{TOKEN}: https://packagecloud.io/api/v1/distributions.json`
json = JSON.parse(body)
@@ -9,6 +10,6 @@
os = item['index_name']
item['versions'].each do |version|
target = "#{os}/#{version['index_name']}"
- `package_cloud push gyazo/gyazo-for-linux/#{target} /root/rpmbuild/RPMS/x86_64/$PACKAGE-$VERSION-1.x86_64.rpm`
+ `package_cloud push gyazo/gyazo-for-linux/#{target} /root/rpmbuild/RPMS/x86_64/$PACKAGE-#{VERSION}-1.x86_64.rpm`
end
end

0 comments on commit 3a27631

Please sign in to comment.