本文介绍了如何在heroku上安装SVN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要SVN来安装一些软件包的项目.具体来说,我依赖 node-steam-resources 及其安装说明说

I have a project that needs SVN to install some packages. Specifically, I depend on node-steam-resources and its installation instructions say

在localhost上,它在安装SVN控制台后可以工作.

On localhost it works after installing SVN console.

但是如何在Heroku上做同样的事情?

But how to do the same on Heroku?

推荐答案

您将需要使用 apt buildpack 用于安装操作系统级别的软件包,除了现有的buildpack (大概是heroku/nodejs).

You'll need to use the apt buildpack to install OS-level packages in addition to your existing buildpack (presumably heroku/nodejs).

  1. 在存储库的根目录中创建一个名为Aptfile的新文件.在这里,您可以定义所需的任何其他Ubuntu软件包.

  1. Create a new file called Aptfile in the root of your repository. This is where you will define any additional Ubuntu packages you require.

编辑该文件,使其看起来像这样:

Edit that file so it looks like this:

subversion

  • 添加并提交该文件.

  • Add and commit that file.

    配置Heroku应用以使用正确的buildpack:

    Configure your Heroku app to use the correct buildpacks:

    1. 首先,显式设置您的Node.js buildpack:

    1. First, set your Node.js buildpack explicitly:

    heroku buildpacks:set heroku/nodejs
    

  • 然后添加apt buildpack:

  • Then add the apt buildpack:

    heroku buildpacks:add --index 1 heroku-community/apt
    

  • 运行heroku buildpacks以确保您同时看到两个buildpack,首先显示apt buildpack,然后显示Node.js buildpack.

  • Run heroku buildpacks to make sure you see both buildpacks, with the apt buildpack showing up first and the Node.js buildpack showing up second.

  • 最后,重新部署您的应用程序并查看构建输出.您应该看到已安装subversion软件包,然后已安装Node.js依赖项.

  • Finally, redeploy your application and watch the build output. You should see the subversion package get installed, then your Node.js dependencies get installed.

    这篇关于如何在heroku上安装SVN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

  • 07-14 01:52