mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-07 13:14:47 +08:00
feat(package): fix build-resources-task and move submodule
This commit is contained in:
parent
2472e0556b
commit
60d2c24693
10 changed files with 27 additions and 15 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
|||
[submodule "build/resources/nylas"]
|
||||
path = build/resources/nylas
|
||||
path = src/pro
|
||||
url = git@github.com:nylas/edgehill.git
|
||||
|
|
|
@ -41,9 +41,9 @@ before_install:
|
|||
chmod 400 ~/.ssh/id_rsa;
|
||||
ssh-keyscan github.com >> ~/.ssh/known_hosts;
|
||||
git submodule update --init --recursive;
|
||||
2>/dev/null 1>/dev/null openssl aes-256-cbc -K $encrypted_d583b56b822e_key -iv $encrypted_d583b56b822e_iv -in build/resources/nylas/encrypted_certificates/travis/travis-files.tar.enc -out build/resources/nylas/encrypted_certificates/travis/travis-files.tar -d;
|
||||
2>/dev/null 1>/dev/null openssl aes-256-cbc -K $encrypted_d583b56b822e_key -iv $encrypted_d583b56b822e_iv -in src/pro/encrypted_certificates/travis/travis-files.tar.enc -out src/pro/encrypted_certificates/travis/travis-files.tar -d;
|
||||
mkdir build/resources/certs;
|
||||
2>/dev/null 1>/dev/null tar xvf build/resources/nylas/encrypted_certificates/travis/travis-files.tar --directory=build/resources/certs/;
|
||||
2>/dev/null 1>/dev/null tar xvf src/pro/encrypted_certificates/travis/travis-files.tar --directory=build/resources/certs/;
|
||||
2>/dev/null 1>/dev/null source build/resources/certs/set_unix_env.sh;
|
||||
fi
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ install:
|
|||
# http://stackoverflow.com/questions/21002919/running-a-remote-powershell-script-with-a-git-command-in-it-results-in-nativecom
|
||||
Start-Process -FilePath git.exe -ArgumentList 'submodule update' -Wait -NoNewWindow
|
||||
|
||||
secure-file\tools\secure-file -decrypt build\resources\nylas\encrypted_certificates\appveyor\win-nylas-n1.p12.enc -secret $env:DECRYPTION_PASSWORD
|
||||
secure-file\tools\secure-file -decrypt build\resources\nylas\encrypted_certificates\appveyor\set_win_env.ps1.enc -secret $env:DECRYPTION_PASSWORD
|
||||
. build\resources\nylas\encrypted_certificates\appveyor\set_win_env.ps1
|
||||
secure-file\tools\secure-file -decrypt src\pro\encrypted_certificates\appveyor\win-nylas-n1.p12.enc -secret $env:DECRYPTION_PASSWORD
|
||||
secure-file\tools\secure-file -decrypt src\pro\encrypted_certificates\appveyor\set_win_env.ps1.enc -secret $env:DECRYPTION_PASSWORD
|
||||
. src\pro\encrypted_certificates\appveyor\set_win_env.ps1
|
||||
}
|
||||
|
||||
build_script:
|
||||
|
@ -49,7 +49,7 @@ environment:
|
|||
- NODE_VERSION: 0.12
|
||||
PUBLISH_BUILD: true
|
||||
global:
|
||||
CERTIFICATE_FILE: .\build\resources\nylas\encrypted_certificates\appveyor\win-nylas-n1.p12
|
||||
CERTIFICATE_FILE: .\src\pro\encrypted_certificates\appveyor\win-nylas-n1.p12
|
||||
DECRYPTION_PASSWORD:
|
||||
secure: 48VSzDtdBd52Xlo3TZ1NeR1yRRrZ3AU6Px5XjD5RDp44cFU5GYVspecGqX6DGCV7i0D7nldGMyEbXNrjM1t1Kw==
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ babelOptions = require '../static/babelrc'
|
|||
# packages in the root-level node_modules are compiled against Chrome's v8
|
||||
# headers.
|
||||
#
|
||||
# See build/resources/nylas/docs/ContinuousIntegration.md for more detailed
|
||||
# See src/pro/docs/ContinuousIntegration.md for more detailed
|
||||
# instructions on how we build N1.
|
||||
#
|
||||
# Some useful grunt options are:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7bcb1918054cad23fd217dff38df6596b52ee87b
|
|
@ -3,7 +3,7 @@ path = require 'path'
|
|||
|
||||
module.exports = (grunt) ->
|
||||
{cp, mkdir, rm} = require('./task-helpers')(grunt)
|
||||
rootDir = path.resolve(path.join('../', 'internal_packages', 'pro'))
|
||||
rootDir = path.resolve(path.join('../', 'src', 'pro'))
|
||||
|
||||
copyArcFiles = ->
|
||||
cp path.join(rootDir, 'arc-N1', '.arcconfig'), '.arcconfig'
|
||||
|
@ -13,6 +13,18 @@ module.exports = (grunt) ->
|
|||
copySourceExtensions = ->
|
||||
cp path.join(rootDir, 'src'), 'src'
|
||||
|
||||
linkPlugins = ->
|
||||
for plugin in fs.readdirSync(path.join(rootDir, 'packages'))
|
||||
from = path.join(rootDir, 'packages', plugin)
|
||||
to = path.join(path.resolve('internal_packages'), plugin)
|
||||
|
||||
if fs.lstatSync(to)
|
||||
grunt.log.writeln "Removing old symlink at #{to}"
|
||||
fs.unlinkSync(to)
|
||||
|
||||
grunt.log.writeln "Adding '#{plugin}' to internal_packages"
|
||||
fs.symlinkSync(from, to, 'dir')
|
||||
|
||||
desc = 'Adds in proprietary Nylas packages, fonts, and sounds to N1'
|
||||
grunt.registerTask 'add-nylas-build-resources', desc, ->
|
||||
canaryFileExists = fs.existsSync(path.join(rootDir, "README.md"))
|
||||
|
@ -23,3 +35,4 @@ module.exports = (grunt) ->
|
|||
grunt.log.writeln "Found proprietary Nylas plugins"
|
||||
copyArcFiles()
|
||||
copySourceExtensions()
|
||||
linkPlugins()
|
||||
|
|
|
@ -11,5 +11,8 @@
|
|||
"dependencies": {
|
||||
"clearbit": "^1.2"
|
||||
},
|
||||
"engines": {
|
||||
"nylas": "*"
|
||||
},
|
||||
"license": "GPL-3.0"
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ class PackageManager
|
|||
@packageDirPaths.push(path.join(@resourcePath, "spec", "fixtures", "packages"))
|
||||
else
|
||||
@packageDirPaths.push(path.join(@resourcePath, "internal_packages"))
|
||||
@packageDirPaths.push(path.join(@resourcePath, "internal_packages", "pro"))
|
||||
if not safeMode
|
||||
if @devMode
|
||||
@packageDirPaths.push(path.join(configDirPath, "dev", "packages"))
|
||||
|
@ -316,9 +315,8 @@ class PackageManager
|
|||
try
|
||||
metadata = Package.loadMetadata(packagePath) ? {}
|
||||
|
||||
if not (metadata.engines?.nylas) and not (/pro/.test(packagePath))
|
||||
if not (metadata.engines?.nylas)
|
||||
console.error("INVALID PACKAGE: Your package at #{packagePath} does not have a properly formatted `package.json`. You must include an {'engines': {'nylas': version}} property")
|
||||
return false
|
||||
|
||||
{windowTypes} = metadata
|
||||
if windowTypes
|
||||
|
|
|
@ -42,8 +42,6 @@ class Package
|
|||
metadata = JSON.parse(fs.readFileSync(metadataPath))
|
||||
catch error
|
||||
throw error unless ignoreErrors
|
||||
else
|
||||
return null
|
||||
metadata ?= {}
|
||||
metadata.name = packageName
|
||||
|
||||
|
|
1
src/pro
Submodule
1
src/pro
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8a673415fc941615d453fc4f159eef649aaaabd5
|
Loading…
Add table
Reference in a new issue