Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Maintaining a remote package repository using Sencha Cmd

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default Maintaining a remote package repository using Sencha Cmd

    I'm trying to understand how to use the proper commands and flow of creating/updating a remote package repository... using Sencha Cmd v5.1.2.52. This is my current flow of updating a package that is used in one of my apps:

    1. (in package dir) make appropriate changes
    2. (in package dir) change package.json version number (if this doesn't get changed, my app won't pick up the changes)
    3. (in package dir) sencha package build
    4. (in workspace that contains package dir/build/<my_package>) sencha package add <my_package>.pkg (adds to local repo)
    5. cp bin/Sencha/Cmd/repo/pkgs/ to remote repo
    6. (in app dir, separate from above workspace) sencha app refresh -packages
    7. (in app dir) sencha app build

    First question... am I doing anything weird? Are there any shortcuts I could take? Second question... is this how others are doing it? I couldn't figure out a good way of doing it from the docs. I found a couple of threads (here and here) with similar issues, but they're about a year old, so I was hoping there'd be an update.

    Step 2 seems strange that I HAVE to update the version number, and step 4 seems strange as well. Ideally, I'd have my package workspace as saved off in SVN, so I'd do a package build, and the package hosting structure would be added to my workspace dir, which is where I basically could do my hosting from SVN... that would cut out steps 4 and 5. I realize a package refresh is necessary in the app that is using it, but having to update the version is something I know I'll forget to do... so is there a way to just do a "hard refresh?"

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Hillsborough, NC
    Posts
    429

    Default

    I'm just embarking on this journey.

    I see no replies so I'm assuming the process described is the way to go.

    Any updates? Is this really how it is done?

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    I wasn't able to come up with a better solution, other than automating the process with a script.

  4. #4
    Ext JS Premium Member
    Join Date
    Jul 2008
    Location
    New Zealand
    Posts
    195

    Default

    I'm just embarking on this too, following what is written at the bottom of this doc page:
    1. Tell Sencha CMD about yet another remote repo:
      Code:
      sencha package repo add drakees http://drakees.com/extjspackages/
    2. Upload the .pkg files up there.
      By the way, how do we specify version numbers in the package file names? There is no version in the *.pkg file names by default.
    3. Code:
      $ sencha repository list
      Sencha Cmd v6.0.1.76
      [INF] Remote repository connections (2):
      [INF] 
      [INF]     sencha - http://cdn.sencha.com/cmd/packages/
      [INF]     drakees - http://drakees.com/extjspackages/
    4. Code:
      $ sencha package list drakees
      Sencha Cmd v6.0.1.76
      [INF] Listing of drakees catalog
      [INF]    0 package(s)
      Nothing happens, and I also see that no request is actually made to the remote repo.
    So, how do we get Sencha CMD to retrieve the list of packages from custom remote repo?

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    Quote Originally Posted by Greendrake View Post
    I'm just embarking on this too, following what is written at the bottom of this doc page:
    1. Tell Sencha CMD about yet another remote repo:
      Code:
      sencha package repo add drakees http://drakees.com/extjspackages/
    2. Upload the .pkg files up there.
      By the way, how do we specify version numbers in the package file names? There is no version in the *.pkg file names by default.
    3. Code:
      $ sencha repository list
      Sencha Cmd v6.0.1.76
      [INF] Remote repository connections (2):
      [INF] 
      [INF]     sencha - http://cdn.sencha.com/cmd/packages/
      [INF]     drakees - http://drakees.com/extjspackages/
    4. Code:
      $ sencha package list drakees
      Sencha Cmd v6.0.1.76
      [INF] Listing of drakees catalog
      [INF]    0 package(s)
      Nothing happens, and I also see that no request is actually made to the remote repo.

    So, how do we get Sencha CMD to retrieve the list of packages from custom remote repo?
    Just a real quick question, is the name of the package actually drakees, or is that the name of the repo only? Does sencha package list show your package?

  6. #6
    Ext JS Premium Member
    Join Date
    Jul 2008
    Location
    New Zealand
    Posts
    195

    Default

    Quote Originally Posted by incutonez View Post
    is the name of the package actually drakees, or is that the name of the repo only? Does sencha package list show your package?
    No that's the name of the repo only. I am trying to get Sencha CMD to read the repo from the URL specified in the first step in my previous post, but it won't even try. I thought that by seeing what request it tries I would be able to figure out what format of response is expected from the repo (as there seems to be no documentation on it yet), but nothing happens.
    sencha package list shows packages from the global catalog only.

  7. #7
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    Quote Originally Posted by Greendrake View Post
    sencha package list shows packages from the global catalog only.
    Yes, and I would assume your packages from the remote repo would show in there... do they not? I haven't actually tried testing this yet, but that's what I would assume would happen... so it wouldn't show the repo, just the packages that are hosted from that repo, like it does for the Sencha repo (as I have a ton of Ext related packages that I did not add in the global list, so I'm assuming they come from the sencha repo).

  8. #8
    Ext JS Premium Member
    Join Date
    Jul 2008
    Location
    New Zealand
    Posts
    195

    Default

    Quote Originally Posted by incutonez View Post
    Yes, and I would assume your packages from the remote repo would show in there... do they not? I haven't actually tried testing this yet, but that's what I would assume would happen...
    Well the first question here is how is Sencha CMD going to read the list of packages from the custom repo URL? The documentation says nothing on it but this:
    That is, assuming you have hosted your "pkgs" folder content at the above HTTP URL. There is nothing required of that hosting beyond HTTP GET access so a static file server or CDN will work.
    What I did is simply upload my packages in the extjspackages directory on the webserver. If you request the package URL directly e.g.
    http://mysite.com/extjspackages/mypackage.pkg
    then you get it, but the web server has not yet been configured to provide the package list because I simply have no information on what format is expected. Therefore Sencha CMD simply won't even be able to list my packages just yet at this point I am not expecting it to do so.
    But what I am expecting is to see it trying to access the repo to get the list of packages somehow, and this is what I am not seeing (no http request is made to my repo as far as I can see in the web server log).

  9. #9
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    Quote Originally Posted by Greendrake View Post
    Well the first question here is how is Sencha CMD going to read the list of packages from the custom repo URL? The documentation says nothing on it but this:

    What I did is simply upload my packages in the extjspackages directory on the webserver. If you request the package URL directly e.g.
    http://mysite.com/extjspackages/mypackage.pkg
    then you get it, but the web server has not yet been configured to provide the package list because I simply have no information on what format is expected. Therefore Sencha CMD simply won't even be able to list my packages just yet at this point I am not expecting it to do so.
    But what I am expecting is to see it trying to access the repo to get the list of packages somehow, and this is what I am not seeing (no http request is made to my repo as far as I can see in the web server log).
    A-ha! Now I understand your problem... I'm wondering if you need to lay it out like it does locally... so locally, it does something like this (and I believe it reads the catalog.json file to know what packages are there):

    repo.jpg

    Furthermore, you can see that's how the Sencha CDN has it set up by probing around... http://cdn.sencha.com/cmd/packages/catalog.json, http://cdn.sencha.com/cmd/packages/ext/catalog.json, etc. I believe all of this is set up for you when you do sencha package add, no? Shouldn't it upload your package to the repo when you execute that command?

  10. #10
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    From reading all of the documentation, it almost seems as if on the hosting machine, you create a local repo, which means you would have to upload your .pkg file to the machine and go through the motions of sencha package add to this local repo on the hosting machine. This local repo is then hosted, so others can check out these packages.

    This seems a little clumsy, if it's correct. You would expect and hope that I could do sencha package add (on my local machine), and it'd take care of uploading the proper information to the remote repo. Unfortunately, I think that might be a little complex, as your local machine wouldn't know about the rest of the packages on the hosting machine, so I could see why this clumsiness is necessary. Sorry, sort of talking aloud here.

Page 1 of 2 12 LastLast

Similar Threads

  1. Maintaining a remote repository for packages
    By Fredric Berling in forum Sencha Cmd
    Replies: 9
    Last Post: 7 Mar 2017, 11:33 AM
  2. Package remote Repository
    By k_cire0426 in forum Sencha Cmd
    Replies: 2
    Last Post: 23 Oct 2013, 1:48 PM
  3. Error: The package command has moved to 'sencha app package'
    By Luis Miguel in forum Sencha Architect 2.x: Help & Discussions
    Replies: 4
    Last Post: 6 Feb 2013, 2:05 PM
  4. Can't package Sencha Touch app as a local android package
    By edwin032602 in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 27 Jul 2012, 2:52 AM
  5. Remote Sort, Remote Group, Remote Paging events.
    By FCTim in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Jun 2010, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •