forked from commercialhaskell/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/rc/v1.1.2' into rc/v1.1.2
- Loading branch information
Showing
7 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
#!/usr/bin/env bash | ||
#TODO: move this logic into release.hs. | ||
set -xe | ||
cd "$(dirname "$0")/../.." | ||
#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). | ||
gpg --export-secret-keys --armor [email protected] >.stack-work/gpg-secret-key.asc | ||
mkdir -p dist | ||
gpg --export-secret-keys --armor [email protected] >dist/gpg-secret-key.asc | ||
cd "etc/vagrant/$1" | ||
|
||
# Double 'vagrant up' is a workaround for FreeBSD | ||
vagrant up || true | ||
vagrant up | ||
|
||
vagrant provision | ||
vagrant rsync | ||
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; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; 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) --no-test-haddocks $2" | ||
vagrant ssh -c "$3 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; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/dist/gpg-secret-key.asc; cd /vagrant && (cd etc/scripts && stack --install-ghc build) && \$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks $2" | ||
vagrant halt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Vagrant.configure(2) do |config| | ||
config.vm.box = "freebsd/FreeBSD-10.3-RELEASE" | ||
config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.memory = "2048" | ||
end | ||
config.ssh.forward_agent = true | ||
config.ssh.shell = "/bin/sh" | ||
config.vm.provision "shell", inline: <<-SHELL | ||
set -xe | ||
if ! which stack; then | ||
mkdir -p /usr/local/etc/pkg/repos | ||
cd /usr/local/etc/pkg/repos | ||
fetch --no-verify-peer --no-verify-hostname https://stack-pkg.applicative.tech/stack-pkg-applicative-tech.conf | ||
fetch --no-verify-peer --no-verify-hostname https://stack-pkg.applicative.tech/stack-pkg-applicative-tech.pub | ||
pkg update | ||
fi | ||
pkg install -y stack ca_root_nss gmake awscli git gnupg | ||
SHELL | ||
end |