电子文档管理器_电子释放管理器

电子文档管理器

Recently we released a new version of our Rodeo, our data science IDE. In the past this meant our users would have to go to our homepage, click on the Rodeo page, download Rodeo again, and then reinstall it. But luckily this is no longer the case! As of the v1.1 release, we’re officially supporting auto-updates for OSX users. To manage these releases and make the auto-updates magically happen, we built a really simple but handy tool called electron-release-manager.

最近,我们发布了Rodeo(数据科学IDE)的新版本。 过去,这意味着我们的用户必须转到我们的主页,单击“ Rodeo”页面 ,再次下载Rodeo,然后重新安装。 但幸运的是,情况已不再如此! 从v1.1版本开始,我们正式支持OSX用户的自动更新。 为了管理这些发布并神奇地进行自动更新,我们构建了一个非常简单但方便的工具,称为electron-release-manager

问题 (The Problem)

One of the biggest challenges in building Rodeo is that it runs cross-platform. We currently support Windows (32 and 64 bit), Mac (64 bit), and Linux (32 and 64 bit) users. These covers pretty much everyone (but not quite). As a result, we’ve seen lots of edge case bugs (for example, strange page display on low-res Windows machines). Lucky for us we’ve been able to fix a lot of them, but that still leaves us with the burning question of how we deliver these fixes to our users.

构建Rodeo的最大挑战之一是它运行跨平台。 我们目前支持Windows(32位和64位),Mac(64位)和Linux(32位和64位)用户。 这些内容几乎涵盖了所有人(但不是全部)。 结果,我们看到了很多边缘错误(例如,低分辨率Windows计算机上奇怪的页面显示)。 幸运的是,我们已经能够修复很多问题,但这仍然使我们面临着一个亟待解决的问题,即我们如何向用户提供这些修复程序。

We quickly found out that making users manually download and reinstall Rodeo was NOT the way to go. There were just too many steps involved and we observed that when we pushed changes, it took a really long time for our users to migrate.

我们很快发现,让用户手动下载并重新安装Rodeo并不是路要走。 涉及的步骤太多了,我们观察到,当我们进行更改 ,用户迁移花费了很长时间

输入发布经理 (Enter the release manager)

So to counteract this we did 2 things:

为了解决这个问题,我们做了两件事:

(1) Added auto-update support to Rodeo

(1)为Rodeo添加了自动更新支持

(2) Built a way to quickly manage and deploy updates to Rodeo

(2)建立了一种快速管理更新并将其部署到Rodeo的方法

The electron-release-manager is a simple node.js app that:

electron-release-manager是一个简单的node.js应用程序,该应用程序:

  • keeps track of Rodeo (or your own app) releases in S3
  • implements the Squirrel Server spec
  • show your old releases and provide downloadable links for them
  • 跟踪S3中Rodeo(或您自己的应用)的发布
  • 实现Squirrel服务器规范
  • 显示您的旧版本并为其提供可下载的链接

使用电子释放管理器自动更新 (Auto-updates with electron-release-manager)

In the v0.34.0 release of Electron, support for auto-updates was introduced. As I mentioned, Electron uses Squirrel for handling downloading and installing updates to an Electron app. The protocol is really simple. Just provide a HTTP endpoint that accepts a parameter indicating the user’s version of the app, and then respond with an HTTP message indicating whether or not there’s a newer version.

在Electron的v0.34.0版本中,引入了对自动更新的支持。 正如我提到的,Electron使用Squirrel处理下载和安装对Electron应用程序的更新。 该协议非常简单 。 只需提供一个HTTP端点即可,该端点接受一个指示用户的应用程序版本的参数,然后使用HTTP消息进行响应,以指示是否有较新版本。

{
    "url": "http://mycompany.com/myapp/releases/myrelease",
    "name": "My Release Name",
    "notes": "Theses are some release notes innit",
    "pub_date": "2013-09-18T12:29:53+01:00",
}

{
    "url": "http://mycompany.com/myapp/releases/myrelease",
    "name": "My Release Name",
    "notes": "Theses are some release notes innit",
    "pub_date": "2013-09-18T12:29:53+01:00",
}

Unfortunately Electron doesn’t supply you with the server, so it’s up to you to either (A) implement the protocol yourself or (B) use someone else’s open source tool that does!

不幸的是,Electron并没有为您提供服务器,因此,取决于您(A)自己实现协议还是(B)使用其他人提供的开源工具!

And that’s exactly what electron-release-manager does. It let’s you upload your releases to S3 (everyone’s favorite, cheapest file store) and serve them to your app’s users. And the end result? Your users get a little notification message telling them they’re app is ready to update!

而这正是electron-release-manager所做的。 它使您可以将发行版本上传到S3(每个人最喜欢的,最便宜的文件存储),并将其提供给应用程序的用户。 最终结果是什么? 您的用户会收到一则通知消息,告诉他们他们的应用已准备好更新!

在S3中存储发行版 (Storing releases in S3)

We have something of an S3 addiction here at Yhat. We use it for (almost) everything. If you’re not familiar with it, please give it a look.

在Yhat,我们有些S3上瘾。 我们将它用于几乎所有的东西 。 如果您不熟悉它, 请看一下

Electron-release-manager uses s3 as it’s “backend” for storing releases. It’s a really simple architecture. Each release gets a directory. Inside that directory you put all of your builds for that release. Point electron-release-manager at the right bucket and voilà, you’ve got yourself auto-updates!

电子发布管理器使用s3作为存储发布的“后端”。 这是一个非常简单的架构。 每个发行版都有一个目录。 在该目录中,放入该版本的所有内部版本。 将electron-release-manager指向正确的铲斗和机油盒,您便可以进行自动更新!

目录结构 (Directory Structure)

We use a simple directory structure for managing releases and versions in Rodeo. In the s3 bucket, we create a directory for each release (i.e. 1.0.0, 1.0.1, etc.). Within each directory we put our builds for each platform with the following format:

我们使用简单的目录结构来管理Rodeo中的发行版和版本。 在S3存储,我们创建了一个目录,每一个版本(即1.0.01.0.1 ,等)。 在每个目录中,我们使用以下格式放置每个平台的构建:

Rodeo-v${VERSION}-${ARCH}.${FILE_TYPE}

Rodeo-v${VERSION}-${ARCH}.${FILE_TYPE}

So a release looks like this:

所以一个发布看起来像这样:

文件类型 (File Types)

Users downloading your product for the first time will probably want the idiot-proof installers (.dmg for Mac, .exe for Windows). However, for auto-updates with Squirrel, you’ll need to provide .zip files for each platform. In the example above, you can see that we have both .dmg/.exe and .zip files in the release directory for each platform.

首次下载产品的用户可能需要防白痴的安装程序(对于Mac为.dmg ,对于Windows为.exe )。 但是,对于使用Squirrel的自动更新,您需要为每个平台提供.zip文件。 在上面的示例中,您可以看到每个平台的发布目录中都有.dmg/.exe.zip文件。

自己使用 (Use it yourself)

其他建议 (Other Suggestions)

翻译自: https://www.pybloggers.com/2016/02/electron-release-manager/

电子文档管理器

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值