Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS Nightly #857

Closed
harshkhandeparkar opened this issue Mar 15, 2019 · 101 comments
Closed

IS Nightly #857

harshkhandeparkar opened this issue Mar 15, 2019 · 101 comments

Comments

@harshkhandeparkar
Copy link
Member

@jywarren @publiclab/is-reviewers how about creating an IS nightly website where daily builds are pushed? The page can be updated everyday after all the PRs of that day are merged. It will be different from the sequencer.publiclab.org website since only stable versions are pushed there. This will help users find bugs in the latest code easily and be like beta testers without having to clone the repo and do all the things the developers do. This can be like an end user feedback form. What are your thoughts??


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

@jywarren
Copy link
Member

jywarren commented Mar 15, 2019 via email

@harshkhandeparkar
Copy link
Member Author

How about runing it on jywarren/image-sequencer? Can you update it yourself?

@jywarren
Copy link
Member

jywarren commented Mar 15, 2019 via email

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 15, 2019

It can be hosted on maybe sequencer.beta.publiclab.org and since prs are not merged everyday, it can be updated when they are. What do you say? Can you do that? Just merging gh-pages with publicab/main every night(when prs are merged)??

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 15, 2019

Is there a bot which can help?

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 15, 2019

I would have been more than happy to volunteer but I will be busy for 2 yrs as I have mentioned many times bfore.

@harshkhandeparkar
Copy link
Member Author

There is a way to automate this....

Does PL have a server which runs 24hrs?

@harshkhandeparkar
Copy link
Member Author

@subhahu123 do you have any good ideas for this?

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 17, 2019

@harshithpabbati

@harshithpabbati
Copy link

Yeah !!

@harshkhandeparkar
Copy link
Member Author

Do you know some way to do this auto updating? A bit maybe?

@harshithpabbati
Copy link

I will check through this.

@harshithpabbati
Copy link

Or else I can volunteer for this to update them.

@harshkhandeparkar
Copy link
Member Author

Oh Awesome. You can ask @jywarren about that. Thank you.

@harshkhandeparkar
Copy link
Member Author

Do you use linux btw? @harshithpabbati

@harshithpabbati
Copy link

Yeah.

@harshkhandeparkar
Copy link
Member Author

I can write a script for you if you want. You can type update-is in the terminal and it will do everything for you and finally ask for your github username. Shall I do that. It won't be very difficult.

@harshithpabbati
Copy link

Ok thanks for that!!

@harshkhandeparkar
Copy link
Member Author

Cool. Should it be update-is or something else?

@harshithpabbati
Copy link

Make it update-is no prob.

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 17, 2019

Ok. The script is really easy actually.

Edit: posted below

This will ask for your username and password.

You can create a directory named bin in your home folder /home/[username]/

create a file named update-is without any extension in the bin folder. Drop the code mentioned above and run this command

username@pc:~$ sudo chmod +x ~/bin/update-is

That is it.

You can try this out right now. You will have to initialize gh-pages though. Please note that this will directly copy the code here and it will not work if you have the /image-sequencer/ in the URL as the manifest.json will not allow you to do that. So you will have to host this on some actual URL like beta.sequencer.publiclab.org. I don't know how you can do that but you can ask @jywarren for the hosting. To redirect to that URL you can change the file CNAME and the script already does that. Thank you.

@harshithpabbati
Copy link

Thanks @harshkhandeparkar

@harshkhandeparkar
Copy link
Member Author

I have edited the comment. Please read it again

@harshithpabbati
Copy link

@harshkhandeparkar hey did you renamed it as is ???

@harshkhandeparkar
Copy link
Member Author

Renamed what?

@harshithpabbati
Copy link

Getting an error when i tried to run it.

@harshkhandeparkar
Copy link
Member Author

Can you please tell me the error?

@harshithpabbati
Copy link

Oh yah the bot can't have the repo 😅

@harshithpabbati
Copy link

I will repost this such that everyone can use this .

@harshkhandeparkar
Copy link
Member Author

@jywarren does PL have a server which runs 24x7??

@jywarren
Copy link
Member

jywarren commented Mar 18, 2019 via email

@jywarren
Copy link
Member

jywarren commented Mar 19, 2019

I also use my own publish to gh-pages script, fwiw:

git checkout main
git pull publiclab main
git checkout gh-pages
git merge main -m 'merge from main'
npm install
git add -f node_modules package-lock.json # inefficient because we don't really need ALL node modules...
git commit -m 'added node modules for gh-pages demo'
git push publiclab gh-pages
git checkout main
npm install

@jywarren
Copy link
Member

Also, i just released the latest to https://sequencer.publiclab.org and pointed beta.sequencer.publiclab.org to https://harshithpabbati.github.io/image-sequencer/!

@harshithpabbati
Copy link

@jywarren check the url beta.sequencer.publiclab.org i cant get it.

@jywarren
Copy link
Member

ah, you need to add a CNAME file!

@harshithpabbati
Copy link

harshithpabbati commented Mar 19, 2019

Where should i add it ??? in gh-pages branch ??

@jywarren
Copy link
Member

jywarren commented Mar 19, 2019 via email

@harshkhandeparkar
Copy link
Member Author

harshkhandeparkar commented Mar 19, 2019

Hello harshith, the last revision of the script I made actually creates the CNAME file and also points to beta.sequencer.publiclab.org. Please change your script locally.
Reposting

#!/bin/bash
set -e

if [ -d ~/.is ];
then
  pushd ~/.is

  if [ -d ~/.is/image-sequencer/ ];
  then
    rm -rf ~/.is/*
  fi
    git clone https://github.com/Harshithpabbati/image-sequencer.git

    pushd ~/.is/image-sequencer/
    git checkout gh-pages
    git remote add upstream https://github.com/publiclab/image-sequencer.git
    git fetch upstream
    git merge -f upstream/main
    npm run setup
    grunt browserify
    grunt uglify

    if [ ! -f CNAME ];
    then
      touch CNAME
    fi
    echo "beta.sequencer.publiclab.org" > CNAME

    git add .
    git add -f node_modules/
    git commit -m "update"
    git push

    popd 
    popd
else
  mkdir ~/.is
  update-is
fi

@harshkhandeparkar
Copy link
Member Author

Hey harshith, would you mind posting the update script somewhere on github so I can propose cahnges whenever needed? When we add the dist files to gitignore, the script will have to be changed, if anything breaks, I can open a pr and then you can pull the latest script when ot gets updated. Would you mind putting it on github?

@harshithpabbati
Copy link

Ok where should I keep it ?? In my repos??

@harshkhandeparkar
Copy link
Member Author

Anywhere you like. Just tell me where. Thanks.😊

@harshithpabbati
Copy link

Fine i will create a repo and I will send you the link.

@publiclab publiclab deleted a comment from subhahu123 Mar 19, 2019
@harshkhandeparkar
Copy link
Member Author

@Harshithlabbati a new pr was juet merged! Please run the script. Also please make sure that you have the latest version that I had posted. It adds the CNAME file to the branch. Let's see if beta.sequencer.publiclab.org redirects.

@harshithpabbati
Copy link

Yeah it's redirecting 👍

@harshkhandeparkar
Copy link
Member Author

I will close this issue in a pr where this is documented in README.md file. @jywarren I noticed that the description of this repo has the link http://sequencer.publiclab.org can it be changed to have https?

@jywarren
Copy link
Member

jywarren commented Mar 19, 2019 via email

@harshithpabbati
Copy link

Do I need to document about beta.sequencer.publiclab.org

@harshithpabbati
Copy link

Ok I am done with the script.

@harshkhandeparkar
Copy link
Member Author

I will do the documentation

@harshithpabbati
Copy link

Ok fine thanks.

@jywarren
Copy link
Member

Hi @harshithpabbati @harshkhandeparkar shall we place this script in a /scripts/ folder in the repository? Thanks!

@harshkhandeparkar
Copy link
Member Author

The core script is in my repo HarshKhandeparkar/Update-is and the github action is in Harshith's repo. We can definitely migrate the script but that won't change Harshith's github action.

@harshithpabbati
Copy link

Yes @jywarren, we can do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants