-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: download and extract using
sn-releases
crate
The code for downloading and extracting release binaries from Github and S3 was being repeated in several different places, so we decided to put some common code for it in a crate. We are now updating `safeup` to use it, which removes both the `github` and `s3` modules, and makes the `install_bin` tests simpler. From the user's point of view, functionally everything should be the same. I also added a quick Vagrantfile here that can be used for testing safeup. This is useful if you don't want your local machine littered with binaries that were only used for testing.
- Loading branch information
Showing
15 changed files
with
315 additions
and
12,256 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Vagrant.configure("2") do |config| | ||
config.vm.box = "generic/ubuntu2204" | ||
config.vm.provider :libvirt do |libvirt| | ||
libvirt.memory = 4096 | ||
end | ||
config.vm.synced_folder ".", | ||
"/vagrant", | ||
type: "9p", | ||
accessmode: "mapped", | ||
mount_options: ['rw', 'trans=virtio', 'version=9p2000.L'] | ||
config.vm.provision "file", source: "~/.ssh/id_rsa", destination: "/home/vagrant/.ssh/id_rsa" | ||
config.vm.provision "shell", inline: "apt-get update -y" | ||
config.vm.provision "shell", inline: "apt-get install -y build-essential" | ||
config.vm.provision "shell", privileged: false, inline: <<-SHELL | ||
curl -L -O https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init | ||
chmod +x rustup-init | ||
./rustup-init --default-toolchain stable --no-modify-path -y | ||
echo "source ~/.cargo/env" >> ~/.bashrc | ||
SHELL | ||
config.vm.provision "shell", inline: <<-SHELL | ||
curl -L -O https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init | ||
chmod +x rustup-init | ||
./rustup-init --default-toolchain stable --no-modify-path -y | ||
echo "source ~/.cargo/env" >> ~/.bashrc | ||
# Copy the binaries to a system-wide location for running tests as the root user | ||
sudo cp ~/.cargo/bin/** /usr/local/bin | ||
SHELL | ||
config.vm.provision "shell", privileged: false, inline: <<-SHELL | ||
mkdir -p ~/.vim/tmp/ ~/.vim/backup | ||
cat <<'EOF' > ~/.vimrc | ||
set nocompatible | ||
let mapleader=" " | ||
syntax on | ||
set background=dark | ||
set backspace=indent,eol,start | ||
set backupdir=~/.vim/tmp// | ||
set directory=~/.vim/backup | ||
set expandtab | ||
set foldlevel=1 | ||
set foldmethod=indent | ||
set foldnestmax=10 | ||
set hlsearch | ||
set ignorecase | ||
set incsearch | ||
set laststatus=2 | ||
set nobackup | ||
set nofoldenable | ||
set nowrap | ||
set number relativenumber | ||
set ruler | ||
set shiftwidth=4 | ||
set smartindent | ||
set showcmd | ||
set shortmess+=A | ||
set tabstop=4 | ||
set viminfo+=! | ||
nnoremap j gj | ||
nnoremap k gk | ||
EOF | ||
SHELL | ||
end |
This file was deleted.
Oops, something went wrong.
414 changes: 0 additions & 414 deletions
414
resources/sn_cli_release_missing_asset_response_body.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
414 changes: 0 additions & 414 deletions
414
resources/sn_node_release_missing_asset_response_body.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
414 changes: 0 additions & 414 deletions
414
resources/sn_testnet_release_missing_asset_response_body.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.