diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 1bb45d1..87d02a8 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-bench] jobs: bench: @@ -13,7 +15,7 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: @@ -36,10 +38,11 @@ jobs: - name: Run bench and graph results working-directory: ./bench run: ./bench.sh - - uses: chrislennon/action-aws-cli@v1.1 - - name: Upload to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 - run: aws s3 cp ./bench/results/ s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bench/${{ steps.version.outputs.VERSION }}/ --recursive + - name: Install B2 CLI + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 + - name: Upload to B2 + run: | + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 sync ./bench/results/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/hyperbuild/bench/${{ steps.version.outputs.VERSION }}/ diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index c22565f..395a9bb 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-cli] jobs: cli: @@ -29,7 +31,7 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Get file name id: file shell: bash @@ -41,11 +43,18 @@ jobs: profile: minimal default: true - name: Build CLI + working-directory: ./cli run: cargo build --release - - uses: chrislennon/action-aws-cli@v1.1 - - name: Upload to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 - run: aws s3 cp ./target/release/hyperbuild${{ matrix.EXT }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/${{ steps.file.outputs.FILE }} --content-type ${{ matrix.MIME }} + - name: Install B2 CLI (macOS, Linux) + if: runner.os != 'Windows' + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 + - name: Install B2 CLI (Windows) + if: runner.os == 'Windows' + run: | + pip install --upgrade b2 + - name: Upload to B2 + run: | + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 upload-file --contentType ${{ matrix.MIME }} ${{ secrets.CICD_CLI_B2_BUCKET_NAME }} ./cli/target/release/hyperbuild-cli${{ matrix.EXT }} hyperbuild/bin/${{ steps.file.outputs.FILE }} diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 2b3f9d8..3f41d37 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-java] jobs: build: @@ -98,4 +100,6 @@ jobs: EOF - mvn clean deploy + if [[ "$GITHUB_REF" != refs/tags/v* ]]; then + mvn clean deploy + fi diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c39080c..fd99939 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-nodejs] jobs: build: @@ -12,7 +14,7 @@ jobs: matrix: # Use windows-2016 as windows-2019 has LNK1181 error when building Neon module. os: [ubuntu-latest, windows-2016, macos-latest] - node: [8, 9, 10, 11, 12, 13] + node: [8, 9, 10, 11, 12, 13, 14] include: - os: ubuntu-latest ARCH: linux-x86_64 @@ -25,7 +27,7 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: @@ -41,13 +43,19 @@ jobs: run: | npm install node node_modules/neon-cli/bin/cli.js build --release - - uses: chrislennon/action-aws-cli@v1.1 - - name: Upload to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 - run: aws s3 cp ./nodejs/native/index.node s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/nodejs/${{ steps.version.outputs.VERSION }}/${{ matrix.ARCH }}-node${{ matrix.node }}.node + - name: Install B2 CLI (macOS, Linux) + if: runner.os != 'Windows' + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 + - name: Install B2 CLI (Windows) + if: runner.os == 'Windows' + run: | + pip install --upgrade b2 + - name: Upload to B2 + run: | + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 upload-file ${{ secrets.CICD_CLI_B2_BUCKET_NAME }} ./nodejs/native/index.node hyperbuild/bin/nodejs/${{ steps.version.outputs.VERSION }}/${{ matrix.ARCH }}-node${{ matrix.node }}.node package: runs-on: ubuntu-latest needs: build @@ -56,18 +64,17 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: - node-version: 13.x - - uses: chrislennon/action-aws-cli@v1.1 + node-version: 14.x + - name: Install B2 CLI + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 - name: Pack and publish package working-directory: ./nodejs - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 run: | cat << 'EOF' > .npmrc package-lock=false @@ -76,6 +83,9 @@ jobs: npm install rm -rf dist node node_modules/typescript/bin/tsc - aws s3 mv s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/nodejs/${{ steps.version.outputs.VERSION }}/ ./dist/. --recursive + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 sync b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/hyperbuild/bin/nodejs/${{ steps.version.outputs.VERSION }}/ ./dist/. cp ../README.md . - npm publish + if [[ "${{ steps.version.outputs.VERSION }}" != "0.0.0" ]]; then + npm publish + fi diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2148e99..f109018 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-python] jobs: build: @@ -30,7 +32,7 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Get native module file name id: native_file shell: bash @@ -52,14 +54,20 @@ jobs: - name: Build native module working-directory: ./python run: cargo build --release - - uses: chrislennon/action-aws-cli@v1.1 - - name: Upload to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 + - name: Install B2 CLI (macOS, Linux) + if: runner.os != 'Windows' + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 + - name: Install B2 CLI (Windows) + if: runner.os == 'Windows' + run: | + pip install --upgrade b2 + - name: Upload to B2 # Convert dots to underscores in Python version as Python uses dots to represent import hierarchy. - run: aws s3 cp ./python/target/release/${{ matrix.LIBFILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }} + run: | + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 upload-file --contentType ${{ matrix.MIME }} ${{ secrets.CICD_CLI_B2_BUCKET_NAME }} ./python/target/release/${{ matrix.LIBFILE }} hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }} package: runs-on: ubuntu-latest needs: build @@ -68,26 +76,21 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Python uses: actions/setup-python@v1 with: python-version: '3.5' architecture: 'x64' - name: Install Python dependencies - # chrislennon/action-aws-cli@v1.1 interferes with installed Python libraries. - # Installing using pip seems to be more reliable when done individually. run: | - pip install --upgrade awscli pip install --upgrade wheel pip install --upgrade setuptools pip install --upgrade twine + - name: Install B2 CLI + run: sudo pip install --upgrade b2 - name: Pack and publish package working-directory: ./python - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 run: | cat << 'EOF' > "$HOME/.pypirc" [pypi] @@ -95,6 +98,9 @@ jobs: password = ${{ secrets.PYPI_API_TOKEN }} EOF cp ../README.md . - aws s3 mv s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/ ./hyperbuild/. --recursive + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 sync b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/hyperbuild/bin/python/${{ steps.version.outputs.VERSION }}/ ./hyperbuild/. python setup.py sdist bdist_wheel - python -m twine upload dist/* + if [[ "${{ steps.version.outputs.VERSION }}" != "0.0.0" ]]; then + python -m twine upload dist/* + fi diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7810024..3bd14e3 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -4,6 +4,8 @@ on: create: tags: - 'v*' + repository_dispatch: + types: [wf-ruby] jobs: build: @@ -24,7 +26,7 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" # Install Ruby manually as actions/setup-ruby@v1 does not compile with `--enable-shared`. - name: Prepare for rbenv run: | @@ -48,10 +50,13 @@ jobs: - name: Set up rbenv (Linux) if: runner.os == 'Linux' shell: bash -l {0} + # rbenv-installer now uses Linux brew to install Ruby, which we do not want. run: | sudo apt install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev - wget -O install-rbenv.sh https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer - bash install-rbenv.sh || true # Ignore rbenv-doctor. + git clone https://github.com/rbenv/rbenv.git ~/.rbenv + echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile + mkdir -p "$HOME/.rbenv/plugins" + git clone https://github.com/rbenv/ruby-build.git "$HOME/.rbenv/plugins/ruby-build" - name: Set up Ruby shell: bash -l {0} run: | @@ -67,13 +72,19 @@ jobs: shell: bash -l {0} run: cargo build --release working-directory: ./ruby - - uses: chrislennon/action-aws-cli@v1.1 - - name: Upload to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 - run: aws s3 cp ./ruby/target/release/${{ matrix.FILE }} s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }} + - name: Install B2 CLI (macOS, Linux) + if: runner.os != 'Windows' + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 + - name: Install B2 CLI (Windows) + if: runner.os == 'Windows' + run: | + pip install --upgrade b2 + - name: Upload to B2 + run: | + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 upload-file ${{ secrets.CICD_CLI_B2_BUCKET_NAME }} ./ruby/target/release/${{ matrix.FILE }} hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/${{ steps.native_file.outputs.NAME }} package: runs-on: ubuntu-latest needs: build @@ -82,21 +93,21 @@ jobs: - name: Get version id: version shell: bash - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Ruby uses: actions/setup-ruby@v1 with: ruby-version: '2.5' - - uses: chrislennon/action-aws-cli@v1.1 + - name: Install B2 CLI + run: | + sudo pip install setuptools + sudo pip install --upgrade b2 - name: Pack and publish gem working-directory: ./ruby - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: us-west-2 run: | cp ../README.md . - aws s3 mv s3://${{ secrets.AWS_S3_BUCKET }}/hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/ ./lib/. --recursive + b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} + b2 sync b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/hyperbuild/bin/ruby/${{ steps.version.outputs.VERSION }}/ ./lib/. gem build hyperbuild.gemspec mkdir -p "$HOME/.gem" cat << 'EOF' > "$HOME/.gem/credentials" @@ -104,4 +115,6 @@ jobs: :rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }} EOF chmod 0600 "$HOME/.gem/credentials" - gem push hyperbuild-${{ steps.version.outputs.VERSION }}.gem + if [[ "${{ steps.version.outputs.VERSION }}" != "0.0.0" ]]; then + gem push hyperbuild-${{ steps.version.outputs.VERSION }}.gem + fi diff --git a/.gitignore b/.gitignore index 3c8d3cd..e5b2623 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/Cargo.lock /target /src/gen/ diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 1118515..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,375 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hermit-abi 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clap" -version = "2.33.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hermit-abi" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hyperbuild" -version = "0.0.45" -dependencies = [ - "phf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "proc-macro-error" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro-error-attr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", - "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "proc-macro2" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "siphasher" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "structopt" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "structopt-derive" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" -"checksum phf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -"checksum phf_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -"checksum phf_macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -"checksum phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum proc-macro-error 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" -"checksum proc-macro-error-attr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" -"checksum proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" -"checksum proc-macro2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" -"checksum quote 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -"checksum siphasher 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum structopt 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "863246aaf5ddd0d6928dfeb1a9ca65f505599e4e1b399935ef7e75107516b4ef" -"checksum structopt-derive 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d239ca4b13aee7a2142e6795cbd69e457665ff8037aed33b3effdc430d2f927a" -"checksum syn 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1b5e337360b1fae433c59fcafa0c6b77c605e92540afa5221a7b81a9eca91d" -"checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" -"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml index 610373a..a406a6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" keywords = ["html", "compress", "minifier", "minify", "minification"] categories = ["compression", "command-line-utilities", "development-tools::build-utils", "web-programming"] repository = "https://github.com/wilsonzlin/hyperbuild.git" -version = "0.0.45" +version = "0.1.1" authors = ["Wilson Lin "] edition = "2018" include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] @@ -17,7 +17,6 @@ maintenance = { status = "actively-developed" } [dependencies] phf = { version = "0.8.0", features = ["macros"] } -structopt = "0.3.5" [profile.release] panic = 'abort' diff --git a/README.md b/README.md index bd2ffe1..4b34400 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Available as: ## Performance -Speed and effectiveness of Node.js version compared to [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize). See [bench](./bench) folder for more details. +Speed and effectiveness of Node.js version compared to [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on popular already-minified web pages. See [bench](./bench) folder for more details. -Chart showing speed of HTML minifiers Chart showing effectiveness of HTML minifiers +Chart showing speed of HTML minifiers Chart showing effectiveness of HTML minifiers ## Usage @@ -25,13 +25,11 @@ Speed and effectiveness of Node.js version compared to [html-minfier](https://gi Precompiled binaries are available for x86-64 Windows, macOS, and Linux. -To compile and install from source, run `cargo install hyperbuild`, which requires [Rust](https://www.rust-lang.org/tools/install). - ##### Get -[Windows](https://wilsonl.in/hyperbuild/bin/0.0.45-windows-x86_64.exe) | -[macOS](https://wilsonl.in/hyperbuild/bin/0.0.45-macos-x86_64) | -[Linux](https://wilsonl.in/hyperbuild/bin/0.0.45-linux-x86_64) +[Windows](https://wilsonl.in/hyperbuild/bin/0.1.1-windows-x86_64.exe) | +[macOS](https://wilsonl.in/hyperbuild/bin/0.1.1-macos-x86_64) | +[Linux](https://wilsonl.in/hyperbuild/bin/0.1.1-linux-x86_64) ##### Use @@ -48,37 +46,41 @@ hyperbuild --src /path/to/src.html --out /path/to/output.min.html ```toml [dependencies] -hyperbuild = "0.0.45" +hyperbuild = "0.1.1" ``` ##### Use ```rust -use hyperbuild::hyperbuild; +use hyperbuild::{FriendlyError, hyperbuild}; fn main() { let mut code = b"

Hello, world!

".to_vec(); - // `hyperbuild` minifies a slice in-place and returns the new minified length, but leaves any original code after the minified code intact. + // Minifies a slice in-place and returns the new minified length, + // but leaves any original code after the minified code intact. match hyperbuild(&mut code) { Ok(minified_len) => {} Err((error_type, error_position)) => {} }; - // `hyperbuild_copy` creates a vector copy containing only minified code instead of minifying in-place. + // Creates a vector copy containing only minified code + // instead of minifying in-place. match hyperbuild_copy(&code) { Ok(minified) => {} Err((error_type, error_position)) => {} }; - // `hyperbuild_truncate` minifies a vector in-place, and then truncates the vector to the new minified length. + // Minifies a vector in-place, and then truncates the + // vector to the new minified length. match hyperbuild_truncate(&mut code) { Ok(()) => {} Err((error_type, error_position)) => {} }; - // `hyperbuild_friendly_error` is identical to `hyperbuild` except the error is a FriendlyError instead. - // `code_context` is a string of a visual representation of the source code with line numbers and position markers to aid in debugging syntax issues, and should be printed. + // Identical to `hyperbuild` except with FriendlyError instead. + // `code_context` is a string of a visual representation of the source, + // with line numbers and position markers to aid in debugging syntax. match hyperbuild_friendly_error(&mut code) { Ok(minified_len) => {} Err(FriendlyError { position, message, code_context }) => { @@ -148,7 +150,7 @@ Add as a Maven dependency: in.wilsonl.hyperbuild hyperbuild - 0.0.45 + 0.1.1 ``` diff --git a/bench/README.md b/bench/README.md index 02dc835..cfec4ee 100644 --- a/bench/README.md +++ b/bench/README.md @@ -29,11 +29,13 @@ The [Node.js version of hyperbuild](../nodejs) is tested against [html-minfier]( |Twitter|https://twitter.com/| |Wikipedia|https://en.wikipedia.org/wiki/Soil| +**Note that these pages are already mostly minified.** + For more information on how the tests are fetched, see [fetch.js](./fetch.js). On this [project's README](../README.md), average graphs are shown. Graphs showing per-test results are shown below: -Chart showing speed of HTML minifiers per test Chart showing effectiveness of HTML minifiers per test +Chart showing speed of HTML minifiers per test Chart showing effectiveness of HTML minifiers per test Since speed depends on the input, speed charts show performance relative to hyperbuild-nodejs as a percentage. diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1 @@ +/target diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 0000000..a44e947 --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "hyperbuild-cli" +publish = false +version = "0.1.1" +authors = ["Wilson Lin "] +edition = "2018" + +[dependencies] +hyperbuild = { path = ".." } +structopt = "0.3.5" diff --git a/src/main.rs b/cli/src/main.rs similarity index 100% rename from src/main.rs rename to cli/src/main.rs diff --git a/java/Cargo.toml b/java/Cargo.toml index 425b941..e000e03 100644 --- a/java/Cargo.toml +++ b/java/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "hyperbuild-java" publish = false -version = "0.0.45" +version = "0.1.1" authors = ["Wilson Lin "] edition = "2018" [dependencies] -hyperbuild = "0.0.45" +hyperbuild = "0.1.1" jni = "0.14.0" [lib] diff --git a/java/pom.xml b/java/pom.xml index c310d0e..1ace4c3 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -6,7 +6,7 @@ in.wilsonl.hyperbuild hyperbuild - 0.0.45 + 0.1.1 hyperbuild Fast one-pass in-place HTML minifier written in Rust with context-aware whitespace handling diff --git a/nodejs/native/Cargo.toml b/nodejs/native/Cargo.toml index 5ec23b0..4ff06ac 100644 --- a/nodejs/native/Cargo.toml +++ b/nodejs/native/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hyperbuild-nodejs" publish = false -version = "0.0.45" +version = "0.1.1" authors = ["Wilson Lin "] license = "MIT" build = "build.rs" @@ -16,5 +16,5 @@ crate-type = ["cdylib"] neon-build = "0.3.3" [dependencies] -hyperbuild = "0.0.45" +hyperbuild = "0.1.1" neon = "0.3.3" diff --git a/nodejs/package.json b/nodejs/package.json index 5cf0aab..d3f2987 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "hyperbuild", - "version": "0.0.45", + "version": "0.1.1", "description": "Fast one-pass in-place HTML minifier written in Rust with context-aware whitespace handling", "main": "dist/index.js", "files": [ diff --git a/python/Cargo.toml b/python/Cargo.toml index b572c66..238aa56 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hyperbuild-python" publish = false -version = "0.0.45" +version = "0.1.1" authors = ["Wilson Lin "] edition = "2018" @@ -10,7 +10,7 @@ name = "hyperbuild_python_lib" crate-type = ["cdylib"] [dependencies] -hyperbuild = "0.0.45" +hyperbuild = "0.1.1" [dependencies.pyo3] -version = "0.9.0-alpha.1" +version = "=0.9.0-alpha.1" features = ["extension-module"] diff --git a/python/setup.py b/python/setup.py index 7f6a709..d2f8ec5 100644 --- a/python/setup.py +++ b/python/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="hyperbuild", - version="0.0.45", + version="0.1.1", author="Wilson Lin", author_email="code@wilsonl.in", description="Fast one-pass in-place HTML minifier written in Rust with context-aware whitespace handling", diff --git a/ruby/Cargo.toml b/ruby/Cargo.toml index 1286105..9658d2a 100644 --- a/ruby/Cargo.toml +++ b/ruby/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hyperbuild-ruby" publish = false -version = "0.0.45" +version = "0.1.1" authors = ["Wilson Lin "] edition = "2018" @@ -10,5 +10,5 @@ name = "hyperbuild_ruby_lib" crate-type = ["cdylib"] [dependencies] -hyperbuild = "0.0.45" +hyperbuild = "0.1.1" rutie = "0.7.0" diff --git a/ruby/hyperbuild.gemspec b/ruby/hyperbuild.gemspec index 13daf2e..d5285dd 100644 --- a/ruby/hyperbuild.gemspec +++ b/ruby/hyperbuild.gemspec @@ -2,7 +2,7 @@ require 'rake' Gem::Specification.new do |spec| spec.name = "hyperbuild" - spec.version = "0.0.45" + spec.version = "0.1.1" spec.authors = ["Wilson Lin"] spec.email = ["code@wilsonl.in"] spec.license = "MIT" diff --git a/version b/version index 146c872..503e163 100755 --- a/version +++ b/version @@ -66,7 +66,7 @@ if (cmd('git', 'status', '--porcelain', {throwOnStderr: true, captureStdio: true throw new Error('Working directory not clean'); } -for (const f of ['Cargo.toml', 'nodejs/native/Cargo.toml', 'java/Cargo.toml', 'python/Cargo.toml', 'ruby/Cargo.toml']) { +for (const f of ['Cargo.toml', 'cli/Cargo.toml', 'nodejs/native/Cargo.toml', 'java/Cargo.toml', 'python/Cargo.toml', 'ruby/Cargo.toml']) { replaceInFile(f, /^version = "\d+\.\d+\.\d+"\s*$/m, `version = "${NEW_VERSION}"`); }