Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
cc998414
Unverified
Commit
cc998414
authored
Oct 07, 2019
by
Robert Knight
Committed by
GitHub
Oct 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1394 from hypothesis/add-default-dev-settings
Set SIDEBAR_APP_URL to a sensible default value in dev
parents
bc30c556
bd6b14bb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
23 deletions
+9
-23
Jenkinsfile
Jenkinsfile
+4
-1
developing.rst
docs/developers/developing.rst
+4
-21
gulpfile.js
gulpfile.js
+1
-1
No files found.
Jenkinsfile
View file @
cc998414
...
@@ -148,7 +148,10 @@ stage('Publish') {
...
@@ -148,7 +148,10 @@ stage('Publish') {
sh
"sleep 2"
// Give GitHub a moment to realize the tag exists.
sh
"sleep 2"
// Give GitHub a moment to realize the tag exists.
// Bump the package version and create the GitHub release.
// Bump the package version and create the GitHub release.
sh
"yarn version --no-git-tag-version --new-version ${newPkgVersion}"
sh
"""
export SIDEBAR_APP_URL=https://hypothes.is/app.html
yarn version --no-git-tag-version --new-version ${newPkgVersion}
"""
sh
"scripts/create-github-release.js"
sh
"scripts/create-github-release.js"
// Publish the updated package to the npm registry.
// Publish the updated package to the npm registry.
...
...
docs/developers/developing.rst
View file @
cc998414
...
@@ -73,35 +73,18 @@ This takes longer to setup than :ref:`running-from-browser-ext`.
...
@@ -73,35 +73,18 @@ This takes longer to setup than :ref:`running-from-browser-ext`.
You should follow these steps if you want to make changes to h as well as to
You should follow these steps if you want to make changes to h as well as to
the client.
the client.
First follow the
First follow the `instructions for setting up a development install of h
`instructions for setting up a development install of h <http://h.readthedocs.io/en/latest/developing/>`_.
<http://h.readthedocs.io/en/latest/developing/>`_. Then run both h and the
Once you have a development install of h set up, you can
client at the same time in different shells. **In the client repository**, run:
configure it to use a local build of the client. **In the client repository**,
run:
.. code-block:: sh
.. code-block:: sh
export SIDEBAR_APP_URL=http://localhost:5000/app.html
make dev
make dev
Next, you'll need to create an OAuth client which enables the Hypothesis client
Then in a different shell, **in the h repository**, run:
to request an access token from the service in order to make API calls.
1. Go to http://localhost:5000/admin/oauthclients (you'll need to be logged
in to h as an admin user)
2. Select "Register a new OAuth client"
3. Choose a name (eg. "Client") and set the redirect URL to
http://localhost:5000/app.html. Leave the other settings at their default values.
4. After creating the client, make a note of the randomly generated client ID.
**In the `hypothesis/h` repository**, set the :envvar:`CLIENT_URL` and
:envvar:`CLIENT_OAUTH_ID` env vars to tell h where to load the client from and
what OAuth client to use, before running ``make dev``:
.. code-block:: sh
.. code-block:: sh
export CLIENT_OAUTH_ID={ OAuth client ID from step above }
export CLIENT_URL=http://localhost:3001/hypothesis
make dev
make dev
Once the client and h are running, you can test it out by visiting:
Once the client and h are running, you can test it out by visiting:
...
...
gulpfile.js
View file @
cc998414
...
@@ -324,7 +324,7 @@ function generateBootScript(manifest) {
...
@@ -324,7 +324,7 @@ function generateBootScript(manifest) {
const
defaultSidebarAppUrl
=
process
.
env
.
SIDEBAR_APP_URL
const
defaultSidebarAppUrl
=
process
.
env
.
SIDEBAR_APP_URL
?
`
${
process
.
env
.
SIDEBAR_APP_URL
}
`
?
`
${
process
.
env
.
SIDEBAR_APP_URL
}
`
:
'http
s://hypothes.is
/app.html'
;
:
'http
://localhost:5000
/app.html'
;
let
defaultAssetRoot
;
let
defaultAssetRoot
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment