Skip to content

Commit

Permalink
Develop (#7)
Browse files Browse the repository at this point in the history
* added workflow

* fixed config

* fixed config

* restore all cache

* sparate canary deployment from production package deployment

* fixed config

* changed oo=utput

* added --force-yes

* Feature/scroll (#2)

* added buttons to scroll timelines

* increment version

* refactored store
fixed merge operation for initial value
added center position button

* added time selection step setting

* fixed range behavior if max=min
fixed scroll behavior

* remove console.log

* added tootips

* fixed tootip for reset button

* sync versions

* Bug/firefox scroll (#4)

* don't update package json

* extracted components for top and bottom panels

* sync versions

* upload and publish in one step

* fixed styles (#5)

* fixed scroll position propagation (#6)

* incremented version
  • Loading branch information
Le0Michine committed Dec 11, 2017
1 parent f907bdc commit 4678e00
Show file tree
Hide file tree
Showing 34 changed files with 987 additions and 388 deletions.
174 changes: 129 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,58 @@
version: 2

key: &src-cache-key src-{{ .Branch }}-{{ .Revision }}
key: &npm-dependencies-cache-key npm-dependencies-{{ checksum "package.json" }}
key: &npm-prod-package-cache-key prod-package-{{ .Branch }}-{{ .Revision }}
key: &npm-canary-package-cache-key canary-package-{{ .Branch }}-{{ .Revision }}

steps: &upload-and-publish
- run:
name: "Install Dependencies"
command: |
sudo apt-get update
sudo apt-get -y --force-yes install curl jq
- restore_cache:
key: *npm-prod-package-cache-key
- restore_cache:
key: *npm-canary-package-cache-key
- run:
name: "Upload & Publish Extension to the Google Chrome Store"
command: |
if [ "${CIRCLE_BRANCH}" == "develop" ]; then
export ACCESS_TOKEN=$(curl "https://accounts.google.com/o/oauth2/token" -d "client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token&redirect_uri=urn:ietf:wg:oauth:2.0:oob" | jq -r .access_token)
UPLOAD_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -X PUT -T $PACKAGE_NAME -v "https://www.googleapis.com/upload/chromewebstore/v1.1/items/${APP_ID}")
echo Package uploaded
echo $UPLOAD_RESULT
if [ "$(echo $UPLOAD_RESULT | jq -r .uploadState)" == "FAILURE" ]; then
echo =====================================================================
echo Package validation failed
echo Error: $(echo $result | jq .itemError)
echo =====================================================================
# exit 1
fi
PUBLISH_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -H "Content-Length: 0" -X POST -v "https://www.googleapis.com/chromewebstore/v1.1/items/${APP_ID}/publish")
echo Package published
echo $PUBLISH_RESULT
if [ "$(echo $PUBLISH_RESULT | jq -r .status)" != "["OK"]" ]; then
echo =====================================================================
echo Status: $(echo $PUBLISH_RESULT | jq -r .status)
echo Detail: $(echo $PUBLISH_RESULT | jq -r .statusDetail)
echo =====================================================================
# exit 1
fi
fi
jobs:
build:
install_dependencies:
docker:
- image: circleci/node:9.2.1
environment:
- APP_ID: pekgbpmeppfghkiaaolmjhiooapokgbk
working_directory: /home/circleci/project
steps:
- checkout
- run:
name: "Install Dependencies"
command: |
sudo apt-get update
sudo apt-get -y install curl jq
- save_cache:
paths:
- ./
key: *src-cache-key
# - restore_cache:
# keys:
# - npm-dependencies-{{ checksum "package.json" }}
Expand All @@ -23,10 +63,19 @@ jobs:
- store_artifacts:
path: /home/circleci/.npm/_logs
destination: ./npm-logs/
# - save_cache:
# paths:
# - node_modules
# key: npm-dependencies-{{ checksum "package.json" }}
- save_cache:
paths:
- node_modules
key: npm-dependencies-{{ checksum "package.json" }}
build_prod:
docker:
- image: circleci/node:9.2.1
working_directory: /home/circleci/project
steps:
- restore_cache:
key: *src-cache-key
- restore_cache:
key: *npm-dependencies-cache-key
- run:
name: Build package
command: |
Expand All @@ -35,43 +84,78 @@ jobs:
path: out/out.zip
destination: ./package.zip
- run:
name: Build canary package
name: Rename package
command: mv out/out.zip out/package.zip
- save_cache:
paths:
- out/package.zip
key: *npm-prod-package-cache-key
build_canary:
docker:
- image: circleci/node:9.2.1
working_directory: /home/circleci/project
steps:
- restore_cache:
key: *src-cache-key
- restore_cache:
key: *npm-dependencies-cache-key
- run:
name: Build package
command: |
npm run build:canary
- store_artifacts:
path: out/out.zip
destination: ./canary.zip
- run:
name: "Upload Extension to the Google Chrome Store"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
export ACCESS_TOKEN=$(curl "https://accounts.google.com/o/oauth2/token" -d "client_id=${CLIENT_ID}&client_secret=${CLIENT_SECRET}&refresh_token=${REFRESH_TOKEN}&grant_type=refresh_token&redirect_uri=urn:ietf:wg:oauth:2.0:oob" | jq -r .access_token)
UPLOAD_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -X PUT -T out/out.zip -v "https://www.googleapis.com/upload/chromewebstore/v1.1/items/${APP_ID}")
echo Package uploaded
echo $UPLOAD_RESULT
if [ "$(echo $UPLOAD_RESULT | jq -r .uploadState)" == "FAILURE" ]; then
echo *********************************************************************
echo Package validation failed
echo Error: $(echo $result | jq .itemError | jq -r first.error_code)
echo Detail: $(echo $result | jq .itemError | jq -r first.error_detail)
echo *********************************************************************
# exit 1
fi
fi
- run:
name: "Publish Extension to the Google Chrome Store"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
PUBLISH_RESULT=$(curl -H "Authorization: Bearer ${ACCESS_TOKEN}" -H "x-goog-api-version: 2" -H "Content-Length: 0" -X POST -v "https://www.googleapis.com/chromewebstore/v1.1/items/${APP_ID}/publish")
echo Package published
echo $PUBLISH_RESULT
if [ "$(echo $PUBLISH_RESULT | jq -r .status)" != "["OK"]" ]; then
echo *********************************************************************
echo Status: $(echo $PUBLISH_RESULT | jq -r .status)
echo Detail: $(echo $PUBLISH_RESULT | jq -r .statusDetail)
echo *********************************************************************
# exit 1
fi
fi
name: Rename package
command: mv out/out.zip out/canary.zip
- save_cache:
paths:
- out/canary.zip
key: *npm-canary-package-cache-key
upload_and_publish_canary:
docker:
- image: circleci/node:9.2.1
environment:
- APP_ID: pekgbpmeppfghkiaaolmjhiooapokgbk
- PACKAGE_NAME: out/canary.zip
working_directory: /home/circleci/project
steps:
*upload-and-publish
upload_and_publish_prod:
docker:
- image: circleci/node:9.2.1
environment:
- APP_ID: ibnegikgmnfnmljianjgnhhlcabonobd
- PACKAGE_NAME: out/package.zip
working_directory: /home/circleci/project
steps:
*upload-and-publish

workflows:
version: 2
build:
jobs:
- install_dependencies
- build_prod:
requires:
- install_dependencies
- build_canary:
requires:
- install_dependencies
- upload_and_publish_canary:
requires:
- build_prod
- build_canary
filters:
branches:
only:
- develop
- upload_and_publish_prod:
requires:
- build_prod
- build_canary
filters:
branches:
only:
- master
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
progress = false
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

156 changes: 78 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
{
"name": "worldtime",
"version": "1.3.67",
"description": "Several timezones in popup",
"main": "webpack.config.js",
"repository": "https://github.com/Le0Michine/timezone-extension",
"author": "Lev Mishin",
"license": "ISC",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --config config/webpack.dev.js --content-base src --inline --hot --env.clean false",
"build": "webpack --config config/webpack.dev.js --progress --profile --display-error-details --env.clean true --watch",
"build:prod": "webpack --config config/webpack.prod.js",
"build:canary": "webpack --config config/webpack.canary.js -p"
},
"dependencies": {
"autosuggest-highlight": "^3.1.1",
"bootstrap": "^4.0.0-beta.2",
"es6-promise": "^4.0.5",
"history": "^4.4.0",
"jquery": "^1.9.1",
"lodash": "^4.17.4",
"material-design-icons": "^3.0.1",
"material-ui": "^1.0.0-beta.22",
"material-ui-icons": "^1.0.0-beta.17",
"moment": "^2.19.3",
"moment-timezone": "^0.5.14",
"react": "^16.2.0",
"react-autosuggest": "^9.3.2",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"redux": "^3.7.2",
"redux-localstorage": "^0.4.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0",
"rxjs": "^5.5.5"
},
"devDependencies": {
"@types/chrome": "0.0.55",
"@types/lodash": "^4.14.88",
"@types/moment-timezone": "^0.5.2",
"@types/react": "^16.0.28",
"@types/react-dom": "^16.0.3",
"@types/react-redux": "^5.0.14",
"@types/react-router": "^4.0.19",
"@types/react-router-dom": "^4.2.3",
"@types/react-router-redux": "^5.0.10",
"@types/redux-logger": "^3.0.5",
"@types/webpack": "^2.2.5",
"awesome-typescript-loader": "^3.0.3",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-react-html-attrs": "^2.0.0",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"clean-webpack-plugin": "^0.1.14",
"copy-webpack-plugin": "^4.0.0",
"css-loader": "^0.25.0",
"eslint": "^3.10.0",
"eslint-config-google": "^0.7.0",
"eslint-plugin-react": "^6.6.0",
"generate-json-webpack-plugin": "^0.2.2",
"html-webpack-plugin": "^2.24.1",
"json-loader": "^0.5.7",
"jszip": "^3.1.3",
"style-loader": "^0.13.1",
"typescript": "^2.6.2",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.2.1",
"webpack-merge": "^0.15.0",
"webpack-zip-bundler": "^1.0.0"
}
"name": "worldtime",
"version": "1.4.76",
"description": "Several timezones in popup",
"main": "webpack.config.js",
"repository": "https://github.com/Le0Michine/timezone-extension",
"author": "Lev Mishin",
"license": "ISC",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --config config/webpack.dev.js --content-base src --inline --hot --env.clean false",
"build": "webpack --config config/webpack.dev.js --progress --profile --display-error-details --env.clean true --watch",
"build:prod": "webpack --config config/webpack.prod.js",
"build:canary": "webpack --config config/webpack.canary.js -p"
},
"dependencies": {
"autosuggest-highlight": "^3.1.1",
"bootstrap": "^4.0.0-beta.2",
"es6-promise": "^4.0.5",
"history": "^4.4.0",
"jquery": "^1.9.1",
"lodash": "^4.17.4",
"material-design-icons": "^3.0.1",
"material-ui": "^1.0.0-beta.22",
"material-ui-icons": "^1.0.0-beta.17",
"moment": "^2.19.3",
"moment-timezone": "^0.5.14",
"react": "^16.2.0",
"react-autosuggest": "^9.3.2",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"redux": "^3.7.2",
"redux-localstorage": "^0.4.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0",
"rxjs": "^5.5.5"
},
"devDependencies": {
"@types/chrome": "0.0.55",
"@types/lodash": "^4.14.88",
"@types/moment-timezone": "^0.5.2",
"@types/react": "^16.0.28",
"@types/react-dom": "^16.0.3",
"@types/react-redux": "^5.0.14",
"@types/react-router": "^4.0.19",
"@types/react-router-dom": "^4.2.3",
"@types/react-router-redux": "^5.0.10",
"@types/redux-logger": "^3.0.5",
"@types/webpack": "^2.2.5",
"awesome-typescript-loader": "^3.0.3",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-react-html-attrs": "^2.0.0",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"clean-webpack-plugin": "^0.1.14",
"copy-webpack-plugin": "^4.0.0",
"css-loader": "^0.25.0",
"eslint": "^3.10.0",
"eslint-config-google": "^0.7.0",
"eslint-plugin-react": "^6.6.0",
"generate-json-webpack-plugin": "^0.2.2",
"html-webpack-plugin": "^2.24.1",
"json-loader": "^0.5.7",
"jszip": "^3.1.3",
"style-loader": "^0.13.1",
"typescript": "^2.6.2",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.2.1",
"webpack-merge": "^0.15.0",
"webpack-zip-bundler": "^1.0.0"
}
}
7 changes: 7 additions & 0 deletions src/app.common/actions/DisplaySettingsActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@ export function change24HoursTimeFormatSetting(value: boolean): Action<boolean>
type: "DISPLAY_SETTINGS/TOGGLE_24_HOURS",
payload: value
};
}

export function changeTimeSelectionStepSetting(value: number): Action<number> {
return {
type: "DISPLAY_SETTINGS/CHANGE_TIME_SELECTION_STEP",
payload: value
};
}
Loading

0 comments on commit 4678e00

Please sign in to comment.