From 0e77c4edba7d84ec1e9ca3bae2391c11019b8f94 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 7 Mar 2021 23:01:08 +0000 Subject: debian: set DEB* variables in Vagrantfile --- debian/Vagrantfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/Vagrantfile b/debian/Vagrantfile index 427be1d..938c8b3 100644 --- a/debian/Vagrantfile +++ b/debian/Vagrantfile @@ -1,8 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -GIT_NAME = 'Egor Tensin' -GIT_EMAIL = 'Egor.Tensin@gmail.com' +NAME = 'Egor Tensin' +EMAIL = 'Egor.Tensin@gmail.com' GPG_KEY = '3B3EF1235420917E0DB0723991D679FB92B036CB' UID = Process.euid @@ -21,11 +21,19 @@ Vagrant.configure("2") do |config| # Working with the git repository: config.vm.provision "shell", privileged: false, inline: <<-SHELL - git config --global user.name '#{GIT_NAME}' - git config --global user.email '#{GIT_EMAIL}' + git config --global user.name '#{NAME}' + git config --global user.email '#{EMAIL}' SHELL config.ssh.forward_agent = true + # Set DEB* environment variables: + config.vm.provision "shell", privileged: false, inline: <<-SHELL + tee -a ~/.bashrc <<'EOF' +export DEBFULLNAME='#{NAME}' +export DEBEMAIL='#{EMAIL}' +EOF + SHELL + # gpg-agent forwarding (https://wiki.gnupg.org/AgentForwarding): config.vm.provision "shell", privileged: false, inline: <<-SHELL gpg --keyserver hkp://keyserver.ubuntu.com/ --recv-keys '0x#{GPG_KEY}' -- cgit v1.2.3