Commit cbcd6ae0 authored by James Larrowe's avatar James Larrowe Committed by Ed Reel

Update Code package (#3133)

parent 430eafe7
......@@ -13,9 +13,9 @@ class Code < Package
description 'Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS.'
homepage 'https://code.visualstudio.com/'
version '1.30.1-1'
source_url "https://github.com/Microsoft/vscode/archive/1.30.1.tar.gz"
source_sha256 'bf558c2818159fd2a47fa80c882794505b5d73d118f94f46d09c98b388d9e203'
version '1.30.2'
source_url 'https://github.com/Microsoft/vscode/archive/1.30.2.tar.gz'
source_sha256 '7bf1c9c3c2814146906a6e38188d2f3284e128929e27c2c2dd0bcd7c6422be5e'
binary_url ({
})
......@@ -25,34 +25,38 @@ class Code < Package
depends_on 'nodebrew'
depends_on 'yarn' => :build
depends_on 'gtk2'
depends_on 'ld_default'
depends_on 'libsecret'
depends_on 'libgconf'
depends_on 'xdg_base'
depends_on 'sommelier'
ENV['PATH'] = "#{ENV['HOME']}/.nodebrew/current/bin:#{ENV['PATH']}"
ENV['LIBRARY_PATH'] = CREW_LIB_PREFIX
def self.build
node_ver = "v8.15.0"
old_ld = `ld_default b`.chomp
node_ver = 'v8.15.0'
node_old = `nodebrew ls | fgrep 'current: ' | cut -d' ' -f2`.chomp
node_ver_installed = `nodebrew ls | grep -o #{node_ver} | head -1`.chomp
system "nodebrew install #{node_ver}" unless "#{node_ver_installed}" == "#{node_ver}"
system "nodebrew use #{node_ver}" unless "#{node_old}" == "#{node_ver}"
system "npm install gulp"
system "yarn install"
system "nodebrew install #{node_ver}" unless node_ver_installed == node_ver
system "nodebrew use #{node_ver}" unless node_old == node_ver
system 'npm install gulp'
system 'yarn install'
system "yarn run gulp vscode-linux-#{@arch}"
system "nodebrew uninstall #{node_ver}" unless "#{node_ver_installed}" == "#{node_ver}"
system "nodebrew use #{node_old}" unless "#{node_old}" == "none"
system "nodebrew uninstall #{node_ver}" unless node_ver_installed == node_ver
system "nodebrew use #{node_old}" unless node_old == "none"
system 'ld_default', "#{old_ld}"
end
def self.install
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
system "mv", "../VSCode-linux-#{@arch}", "#{CREW_DEST_PREFIX}/share/code"
system 'mv', "../VSCode-linux-#{@arch}", "#{CREW_DEST_PREFIX}/share/code"
system "sed -i -e 's,ELECTRON_RUN_AS_NODE=1 ,,g' #{CREW_DEST_PREFIX}/share/code/bin/code-oss"
# ^^^ Do not remove this line.
system "ln", "-s", "../share/code/bin/code-oss", "#{CREW_DEST_PREFIX}/bin/code"
system "ln", "-s", "../share/code/bin/code-oss", "#{CREW_DEST_PREFIX}/bin/code-oss"
system 'ln', '-s', '../share/code/bin/code-oss', "#{CREW_DEST_PREFIX}/bin/code"
system 'ln', '-s', '../share/code/bin/code-oss', "#{CREW_DEST_PREFIX}/bin/code-oss"
end
def self.postinstall
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment