This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

v6 deb

  • Loading branch information...
1 parent 7218432 commit 45bc06a8946fd7e84f2b9196ad85eea2ddb93a51 @jdxcode jdxcode committed Jun 9, 2017
Showing with 26 additions and 35 deletions.
  1. +1 −1 resources/deb/heroku-toolbelt/control
  2. +0 −1 resources/deb/heroku/control
  3. +13 −13 resources/deb/heroku/postinst
  4. +12 −20 tasks/deb.rake
@@ -3,7 +3,7 @@ Version: <%= version %>
Section: main
Priority: standard
Architecture: all
-Depends: git-core, heroku (= <%= version %>)
+Depends: heroku (= <%= version %>)
Installed-Size:
Maintainer: Heroku
Description: A metapackage for working with the Heroku platform.
@@ -3,6 +3,5 @@ Version: <%= version %>
Section: main
Priority: standard
Architecture: all
-Depends: ruby2.3|ruby2.2|ruby2.1|ruby2.0|libopenssl-ruby1.9.1, ruby2.3|ruby2.2|ruby2.1|ruby2.0|libreadline-ruby1.9.1, ruby2.3|ruby2.2|ruby2.1|ruby2.0|ruby1.9.1, libssl0.9.8 (>= 0.9.8k) | libssl1.0.0|libssl1.0.2
Maintainer: Heroku
Description: Client library and CLI to deploy apps on Heroku.
@@ -1,17 +1,17 @@
#!/bin/sh
-# remove toolbelt
-rm -f /etc/apt/sources.list.d/heroku.list
-apt-get remove -y heroku-toolbelt heroku || true
+set -ex
-# add heroku repository to apt
-add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
+MACHINE_TYPE=`uname -m`
+if [ $MACHINE_TYPE = 'x86_64' ]; then
+ ARCH=x64
+else
+ ARCH=x32
+fi
-# install heroku's release key for package verification
-wget -qO- https://cli-assets.heroku.com/apt/release.key | apt-key add -
-
-# update your sources
-apt-get update
-
-# install the toolbelt
-apt-get install -y heroku
+mkdir -p /usr/local
+cd /usr/local
+wget -qO- https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-$ARCH.tar.gz | tar xz
+rm -rf /usr/local/heroku
+mv /usr/local/heroku-cli-v* /usr/local/heroku
+ln -sf /usr/local/heroku/bin/heroku /usr/bin/heroku
View
@@ -7,30 +7,15 @@ namespace :deb do
s3_store_dir dist("heroku-toolbelt-#{version}.apt"), "apt", "heroku-toolbelt"
end
- file dist("heroku-toolbelt-#{version}.apt") => [ dist("heroku-toolbelt-#{version}.apt/heroku-#{version}.deb"), dist("heroku-toolbelt-#{version}.apt/heroku-toolbelt-#{version}.deb") ] do |t|
- abort "Don't publish .debs of pre-releases!" if version =~ /[a-zA-Z]$/
-
- cd t.name do |dir|
- touch "Sources"
-
- sh "apt-ftparchive packages . > Packages"
- sh "gzip -c Packages > Packages.gz"
- sh "apt-ftparchive -c #{resource("deb/heroku-toolbelt/apt-ftparchive.conf")} release . > Release"
- sh "gpg --digest-algo SHA512 -abs -u 0F1B0520 -o Release.gpg Release"
- end
+ file dist("heroku-toolbelt-#{version}.apt") => [ dist("heroku-toolbelt-#{version}.apt/heroku-#{version}.deb")] do |t|
+ mkdir_p t.name
end
file dist("heroku-toolbelt-#{version}.apt/heroku-#{version}.deb") => distribution_files("deb") do |t|
mkdir_p File.dirname(t.name)
tempdir do
mkdir_p "usr/local/heroku"
- cd "usr/local/heroku" do
- assemble_distribution
- assemble_gems
- assemble resource("deb/heroku/heroku"), "bin/heroku", 0755
- end
-
assemble resource("deb/heroku/control"), "control"
assemble resource("deb/heroku/postinst"), "postinst"
@@ -43,12 +28,19 @@ namespace :deb do
sh "ar -r #{t.name} debian-binary control.tar.gz data.tar.gz"
end
- end
- file dist("heroku-toolbelt-#{version}.apt/heroku-toolbelt-#{version}.deb") do |t|
tempdir do |dir|
assemble resource("deb/heroku-toolbelt/control"), "DEBIAN/control"
- sh "dpkg-deb --build . #{t.name}"
+ sh "dpkg-deb --build . #{File.dirname(t.name)}/heroku-toolbelt-#{version}.deb"
+ end
+
+ cd File.dirname(t.name) do |dir|
+ touch "Sources"
+
+ sh "apt-ftparchive packages . > Packages"
+ sh "gzip -c Packages > Packages.gz"
+ sh "apt-ftparchive -c #{resource("deb/heroku-toolbelt/apt-ftparchive.conf")} release . > Release"
+ sh "gpg --digest-algo SHA512 -abs -u 0F1B0520 -o Release.gpg Release"
end
end
end

0 comments on commit 45bc06a

Please sign in to comment.