Skip to content

Commit

Permalink
retire binary hlx #696
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-guggisberg committed Apr 2, 2019
1 parent 89f245f commit 731fbfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 90 deletions.
84 changes: 1 addition & 83 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ executors:
node8:
docker:
# use latest node 8 on debian 8 (jessie)
# (on debian 9 (stretch) a runtime error occurs: Error: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory)
- image: circleci/node:8-jessie
environment:
NPM_CONFIG_PREFIX: ~/.npm-global
Expand Down Expand Up @@ -125,87 +124,20 @@ jobs:
command: ~/.npm-global/bin/hlx build && ~/.npm-global/bin/hlx deploy --dirty --wsk-namespace trieloff --wsk-auth $WSK_AUTH --loggly-host trieloff --loggly-auth $LOGGLY_AUTH
working_directory: test/integration

installer:
macos:
xcode: "10.0"
steps:
- checkout
- run:
name: "Setup build tools"
working_directory: ~/
command: |
# makeself
curl -LO https://github.com/megastep/makeself/releases/download/release-2.4.0/makeself-2.4.0.run
chmod +x makeself-2.4.0.run
./makeself-2.4.0.run
cp makeself-2.4.0/*.sh .
# squashfs
HOMEBREW_NO_AUTO_UPDATE=1 brew install squashfs
# nodec
curl -L https://github.com/adobe/node-packer/releases/download/v1.6.0/nodec-darwin-x64.gz | gunzip > nodec
chmod +x nodec
- run:
name: "Creating cache key file"
working_directory: ~/
command: |
NODEC_VERSION=$(./nodec -v)
echo "$NODEC_VERSION" > _cache_key
- restore_cache:
keys:
- v1-nodec-cache-{{ checksum "~/_cache_key" }}
- run:
name: Resolve dependencies
working_directory: ~/project
command: |
npm i --production
- run:
name: Remove unnecessary files & folders from checkout before building installer (see #613)
working_directory: ~/project
command: |
rm -rf .circleci .github .vscode .eslint* test node_modules/calibre/bin
- run:
name: Build Installer
working_directory: ~/
command: |
cp ~/project/index.js ~/project/hlx
~/nodec -r ~/project -o ~/project/build/archive/a.out --skip-npm-install --tmpdir=~/nodec_tmp ~/project/hlx
- save_cache:
paths:
- ~/nodec_tmp
key: v1-nodec-cache-{{ checksum "~/_cache_key" }}
- run:
name: Build SFX shell script
working_directory: ~/
command: |
~/makeself.sh --nox11 ~/project/build/archive ~/project/build/hlx_install.sh "SFX installer for hlx" ./install.sh
- run:
name: Verify Installer
working_directory: ~/project/build
command: sh hlx_install.sh -- --overwrite && hlx --version
- store_artifacts:
path: ~/project/build/hlx_install.sh
- persist_to_workspace:
# save to workspace for downstream jobs
root: ~/project/build
paths:
- hlx_install.sh

github-release:
# https://circleci.com/blog/publishing-to-github-releases-via-circleci/
docker:
- image: cibuilds/github:0.12
steps:
- checkout
- attach_workspace:
at: ./installer_build
- run:
name: "Publish Release on GitHub"
command: |
LATEST_RELEASE_TAG=$(curl -s https://api.github.com/repos/adobe/helix-cli/releases/latest | grep 'tag_name' | cut -d\" -f4)
CHANGELOG=$(git log ${LATEST_RELEASE_TAG}...master | fgrep \# | sed -e 's/^ /- /')
NEWLINE=$'\n'
RELEASE_NOTES="Changes${NEWLINE}--------${NEWLINE}${NEWLINE}${CHANGELOG}${NEWLINE}${NEWLINE}[**TODO** review/edit list of changes]"
ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -b "${RELEASE_NOTES}" -recreate ${CIRCLE_TAG} ./installer_build/
ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -b "${RELEASE_NOTES}" -recreate ${CIRCLE_TAG}
workflows:
version: 2
Expand All @@ -220,10 +152,6 @@ workflows:
only: master
- build
- snyk
- installer:
filters:
branches:
only: master

build-and-release:
jobs:
Expand All @@ -233,17 +161,7 @@ workflows:
only: /^v\d+\.\d+\.\d+$/
branches:
ignore: /.*/
- installer:
requires:
- build
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
branches:
ignore: /.*/
- github-release:
requires:
- installer
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,12 @@ The Helix Command Line Interface allows web developers to create, develop, and d

## Installation

Install `hlx` as a global command. You need Node 8 or newer.
Install `hlx` as a global command. You need Node 8.9 or newer.

```bash
$ npm install -g @adobe/helix-cli
```

Alternatively, if you are on `macOS`, you can install the latest binary version of `hlx` (not requiring Node) via `curl`
:
```bash
$ curl -sL http://www.project-helix.io/cli.sh | sh
```

## Quick Start

```
Expand Down

0 comments on commit 731fbfe

Please sign in to comment.