Skip to content

Commit 52bb197

Browse files
committed
release: script updates
* Vagrantfiles: use puppetlabs boxes for everything * Use --install-ghc when building release script * Add rsync__args to Vagrantfiles * Copy GPG key to Vagrant VMs
1 parent c3c3a5c commit 52bb197

File tree

8 files changed

+18
-41
lines changed

8 files changed

+18
-41
lines changed

etc/scripts/osx-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
set -xe
44
RELEASE_SCRIPT=.local/bin/stack-release-script
55
rm -f "$RELEASE_SCRIPT"
6-
(cd etc/scripts && stack build)
6+
(cd etc/scripts && stack --install-ghc build)
77
$(cd etc/scripts && stack exec which stack-release-script) --arch=x86_64 --upload-label="Mac OS X 64-bit" release

etc/scripts/vagrant-releases.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ init_wd="$(pwd)"
55

66
with_vagrant() {
77
#TODO: set up gpg-agent forwarding for package signing (see http://superuser.com/questions/161973/how-can-i-forward-a-gpg-key-via-ssh-agent).
8+
gpg --export-secret-keys --armor [email protected] >.stack-work/gpg-secret-key.asc
89
pushd "$init_wd/etc/vagrant/$1"
910
vagrant up --provision
1011
vagrant rsync
11-
vagrant ssh -c "export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; cd /vagrant && (cd etc/scripts && stack build) && \$(cd etc/scripts && stack exec which stack-release-script) $2"
12+
vagrant ssh -c "export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; gpg --import /vagrant/.stack-work/gpg-secret-key.asc; cd /vagrant && (cd etc/scripts && stack --install-ghc build) && \$(cd etc/scripts && stack exec which stack-release-script) $2"
1213
vagrant halt
1314
popd
1415
}

etc/scripts/windows-releases.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set TEMP=C:\tmp
77
set RELEASE_SCRIPT=%APPDATA%\local\bin\stack-release-script.exe
88
if exist %RELEASE_SCRIPT% del %RELEASE_SCRIPT%
99
cd etc\scripts
10-
stack install
10+
stack --install-ghc install
1111
if errorlevel 1 exit /b
1212
cd ..\..
1313
%RELEASE_SCRIPT% --arch=i386 --upload-label="Windows 32-bit" release
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
4-
config.vm.box = "chef/centos-6.6-i386"
5-
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"]
4+
config.vm.box = "puppetlabs/centos-6.6-32-nocm"
5+
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"]
66
config.vm.provider "virtualbox" do |vb|
77
vb.memory = "2048"
88
end
99
config.ssh.forward_agent = true
1010
config.vm.provision "shell", inline: <<-SHELL
1111
set -xe
1212
export PATH=/usr/local/bin:$PATH
13-
yum update
13+
yum -y check-update || true
1414
yum -y install perl make automake gcc gmp-devel zlib-devel tar which git xz ncurses-devel
1515
curl -sSL https://www.stackage.org/stack/linux-i386-gmp4 \
1616
| tar xzvf - --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
1717
chmod a+x /usr/local/bin/stack
18-
if ! which cabal; then
19-
pushd /vagrant
20-
stack --install-ghc install cabal-install
21-
cp `stack exec which cabal` /usr/local/bin/cabal
22-
popd
23-
fi
2418
SHELL
2519
end

etc/vagrant/centos-6-x86_64/Vagrantfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
4-
config.vm.box = "chef/centos-6.6"
5-
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"]
4+
config.vm.box = "puppetlabs/centos-6.6-64-nocm"
5+
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"]
66
config.vm.provider "virtualbox" do |vb|
77
vb.memory = "2048"
88
end
99
config.ssh.forward_agent = true
1010
config.vm.provision "shell", inline: <<-SHELL
1111
set -xe
1212
export PATH=/usr/local/bin:$PATH
13-
yup update
13+
yum -y check-update || true
1414
yum -y install epel-release
1515
yum -y install perl make automake gcc gmp-devel zlib-devel rpm-build tar which git xz python-boto deltarpm python-deltarpm rpm-build rpm-sign ncurses-devel
1616
if ! which stack; then
1717
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/6/fpco.repo >/etc/yum.repos.d/fpco.repo
18-
yum update
18+
yum -y check-update || true
1919
fi
2020
yum -y install stack
21-
if ! which cabal; then
22-
stack --install-ghc build cabal-install
23-
cp `stack exec which cabal` /usr/local/bin/cabal
24-
fi
2521
if ! which fpm; then
2622
yum -y install ruby-devel
2723
yum -y install rubygems

etc/vagrant/centos-7-x86_64/Vagrantfile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
4-
config.vm.box = "chef/centos-7.0"
5-
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"]
4+
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
5+
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"]
66
config.vm.provider "virtualbox" do |vb|
77
vb.memory = "2048"
88
end
99
config.ssh.forward_agent = true
1010
config.vm.provision "shell", inline: <<-SHELL
1111
set -xe
1212
export PATH=/usr/local/bin:$PATH
13-
yup update
13+
yum -y check-update || true
1414
yum -y install epel-release
1515
yum -y install perl make automake gcc gmp-devel zlib-devel tar which git python-boto deltarpm python-deltarpm rpm-build rpm-sign ncurses-devel
1616
if ! which stack; then
1717
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/7/fpco.repo >/etc/yum.repos.d/fpco.repo
18-
yum update
18+
yum -y check-update || true
1919
fi
2020
yum -y install stack
21-
if ! which cabal; then
22-
pushd /vagrant
23-
stack --install-ghc install cabal-install
24-
cp `stack exec which cabal` /usr/local/bin/cabal
25-
popd
26-
fi
2721
if ! which fpm; then
2822
yum -y install ruby-devel
2923
gem install fpm --version '< 1.4.0'

etc/vagrant/debian-7-amd64/Vagrantfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
4-
config.vm.box = "chef/debian-7.8"
5-
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"]
4+
config.vm.box = "puppetlabs/debian-7.8-64-nocm"
5+
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"]
66
config.vm.provider "virtualbox" do |vb|
77
vb.memory = "2048"
88
end
@@ -19,10 +19,6 @@ Vagrant.configure(2) do |config|
1919
apt-get update
2020
fi
2121
apt-get install -y stack
22-
if ! which cabal; then
23-
stack --install-ghc build cabal-install
24-
sudo cp `stack exec which cabal` /usr/local/bin/cabal
25-
fi
2622
if ! which fpm; then
2723
apt-get install -y ruby-dev libffi-dev make build-essential
2824
apt-get install -y rubygems || true

etc/vagrant/debian-7-i386/Vagrantfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# vi: set ft=ruby :
33
Vagrant.configure(2) do |config|
44
config.vm.box = "puppetlabs/debian-7.8-32-nocm"
5-
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"]
5+
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack_work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"]
66
config.vm.provider "virtualbox" do |vb|
77
vb.memory = "2048"
88
end
@@ -16,10 +16,6 @@ Vagrant.configure(2) do |config|
1616
curl -sSL https://www.stackage.org/stack/linux-i386 \
1717
| tar xzvf - --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
1818
chmod a+x /usr/local/bin/stack
19-
if ! which cabal; then
20-
stack --install-ghc build cabal-install
21-
cp `stack exec which cabal` /usr/local/bin/cabal
22-
fi
2319
if ! which fpm; then
2420
apt-get install -y ruby-dev libffi-dev make build-essential
2521
apt-get install -y rubygems || true

0 commit comments

Comments
 (0)