mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 09:01:56 +00:00 
			
		
		
		
	Remove TravisCI and AppVeyor configuration files
This commit is contained in:
		
							
								
								
									
										106
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										106
									
								
								.travis.yml
									
									
									
									
									
								
							@@ -1,106 +0,0 @@
 | 
				
			|||||||
language: rust
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
matrix:
 | 
					 | 
				
			||||||
  include:
 | 
					 | 
				
			||||||
    # Stable channel.
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env: TARGET=x86_64-unknown-linux-gnu
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        - TARGET=x86_64-unknown-linux-musl
 | 
					 | 
				
			||||||
        - CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env: TARGET=i686-unknown-linux-gnu
 | 
					 | 
				
			||||||
    - os: osx
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env: TARGET=x86_64-apple-darwin
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        - TARGET=arm-unknown-linux-gnueabihf
 | 
					 | 
				
			||||||
        - CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8
 | 
					 | 
				
			||||||
        - CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: stable
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        - TARGET=aarch64-unknown-linux-gnu
 | 
					 | 
				
			||||||
        - CC_aarch64-unknown-linux-gnu=/usr/bin/aarch64-linux-gnu-gcc-4.8
 | 
					 | 
				
			||||||
        - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc-4.8
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Minimum Rust supported channel.
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: 1.40.0
 | 
					 | 
				
			||||||
      env: TARGET=x86_64-unknown-linux-gnu
 | 
					 | 
				
			||||||
    - os: linux
 | 
					 | 
				
			||||||
      rust: 1.40.0
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        - TARGET=x86_64-unknown-linux-musl
 | 
					 | 
				
			||||||
        - CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
 | 
					 | 
				
			||||||
    - os: osx
 | 
					 | 
				
			||||||
      rust: 1.40.0
 | 
					 | 
				
			||||||
      env: TARGET=x86_64-apple-darwin
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Disable nightly for now
 | 
					 | 
				
			||||||
    # # Code formatting check
 | 
					 | 
				
			||||||
    # - os: linux
 | 
					 | 
				
			||||||
    #   rust: nightly
 | 
					 | 
				
			||||||
    #   # skip the global install step
 | 
					 | 
				
			||||||
    #   install:
 | 
					 | 
				
			||||||
    #     - cargo install --debug --force rustfmt-nightly
 | 
					 | 
				
			||||||
    #   script: cargo fmt -- --check
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sudo: required
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
before_install:
 | 
					 | 
				
			||||||
  - ci/before_install.bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  global:
 | 
					 | 
				
			||||||
    # Default target on travis-ci.
 | 
					 | 
				
			||||||
    # Used as conditional check in the install stage
 | 
					 | 
				
			||||||
    - HOST=x86_64-unknown-linux-gnu
 | 
					 | 
				
			||||||
    # Used on the deployment script
 | 
					 | 
				
			||||||
    - PROJECT_NAME=bat
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
install:
 | 
					 | 
				
			||||||
  # prevent target re-add error from rustup
 | 
					 | 
				
			||||||
  - if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
script:
 | 
					 | 
				
			||||||
  - ci/script.bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
before_deploy:
 | 
					 | 
				
			||||||
  - bash ci/before_deploy.bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
deploy:
 | 
					 | 
				
			||||||
  provider: releases
 | 
					 | 
				
			||||||
  # NOTE updating the `api_key.secure`
 | 
					 | 
				
			||||||
  # - go to: https://github.com/settings/tokens/new
 | 
					 | 
				
			||||||
  # - generate new token using `public_repo` scope
 | 
					 | 
				
			||||||
  # - encrypt it using: `travis encrypt API_KEY_HERE`
 | 
					 | 
				
			||||||
  # - paste the output below
 | 
					 | 
				
			||||||
  api_key:
 | 
					 | 
				
			||||||
    secure: "GZL8nYk+/MZGEqejpP0UMMGVmwUEdxiF9CflFIGccu+/tznDyHnHOpyJmbH3M5IKWIxa7xFgqOE8pHuD4oQXt4mzyJGB0KMKKEFLW7ckbTYKya5bw0heKznaqGnS0Yz+vpfqYR25eiPFYCz7mDsGsCzH5QZqt3cdn9MDQGu1D0IaxPjuBNH3T9kBblR0ifBd3Diy0JYhiVcMSI3V1rkel18F1yBHO2GQ95hkWxVgjANQnefq5+zdzbx4ki539ewYENShA8N0w6ULJVY9LmWRWJIp90ggOD3JCH6Nz/fBpYBqwfABO6Dr7Csw7IRm7pM4IVkFZS1taiDYFX9thxZh3UTmI4YYtSTPxH9NGV47kxPipbf4vAXFwW+1VcHKMpBzz+5IVsHnk1Pfx9/GZsXbqXM3PUWCStec36Xtqh5vQapDKEg9khkEs4b1X7/E73gvpRuQl9gbnyufSVWgDsXIWqM+0aDbqQz1FpLmVxz6eij0cB9vR+8kbNoe/CEPHPO9ZllvAHseukOeHPzSBd8rILORXaaGmQausXz2wWgSsffUSYz4705P8joI0zFCfmkHjL+kA1ZUx5SxLCc1ID7CFFZChhAxHoPL7xc21snswwr8QeheERdwvuzKNaerBGZEw8dmMMx98YkjftIj65DDySr2mRZuufBQeQpmMhFyIT4="
 | 
					 | 
				
			||||||
  # for uploading multiple files
 | 
					 | 
				
			||||||
  file_glob: true
 | 
					 | 
				
			||||||
  # NOTE explanation on each env variable
 | 
					 | 
				
			||||||
  # - PROJECT_NAME: name of the project, set on the `env.global` above
 | 
					 | 
				
			||||||
  # - TRAVIS_TAG: tag name that the build is being deployed for, usually the version number
 | 
					 | 
				
			||||||
  # - TARGET: target triple of the build
 | 
					 | 
				
			||||||
  file:
 | 
					 | 
				
			||||||
    - $PROJECT_NAME-$TRAVIS_TAG-$TARGET.*
 | 
					 | 
				
			||||||
    - $PROJECT_NAME*.deb
 | 
					 | 
				
			||||||
  # don't delete artifacts from previous stage
 | 
					 | 
				
			||||||
  skip_cleanup: true
 | 
					 | 
				
			||||||
  on:
 | 
					 | 
				
			||||||
    # deploy only if we push a tag
 | 
					 | 
				
			||||||
    tags: true
 | 
					 | 
				
			||||||
    # deploy only on stable channel that has TARGET env variable sets
 | 
					 | 
				
			||||||
    condition: $TRAVIS_RUST_VERSION = stable && $TARGET != ""
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
notifications:
 | 
					 | 
				
			||||||
  email:
 | 
					 | 
				
			||||||
    on_success: never
 | 
					 | 
				
			||||||
							
								
								
									
										49
									
								
								appveyor.yml
									
									
									
									
									
								
							
							
						
						
									
										49
									
								
								appveyor.yml
									
									
									
									
									
								
							@@ -1,49 +0,0 @@
 | 
				
			|||||||
environment:
 | 
					 | 
				
			||||||
  global:
 | 
					 | 
				
			||||||
    TARGET: x86_64-pc-windows-msvc
 | 
					 | 
				
			||||||
    RUST_VERSION: stable
 | 
					 | 
				
			||||||
    CRATE_NAME: bat
 | 
					 | 
				
			||||||
    CARGO_HOME: "c:\\cargo"
 | 
					 | 
				
			||||||
    RUSTUP_HOME: "c:\\rustup"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
install:
 | 
					 | 
				
			||||||
  - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
 | 
					 | 
				
			||||||
  - rustup-init.exe -y --default-host %TARGET% --profile minimal
 | 
					 | 
				
			||||||
  - set PATH=%PATH%;C:\cargo\bin
 | 
					 | 
				
			||||||
  - rustc -Vv
 | 
					 | 
				
			||||||
  - cargo -V
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
build: false
 | 
					 | 
				
			||||||
test_script:
 | 
					 | 
				
			||||||
  - cargo test --target %TARGET% --verbose
 | 
					 | 
				
			||||||
  - cargo run --target %TARGET% -- src/bin/bat/main.rs README.md --paging=never
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
before_deploy:
 | 
					 | 
				
			||||||
  # Generate artifacts for release
 | 
					 | 
				
			||||||
  - cargo build --bins --release --verbose
 | 
					 | 
				
			||||||
  - ps: ci\before_deploy.ps1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
deploy:
 | 
					 | 
				
			||||||
  description: 'Automatically deployed release'
 | 
					 | 
				
			||||||
  artifact: /.*\.zip/
 | 
					 | 
				
			||||||
  # Here's how:
 | 
					 | 
				
			||||||
  # - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the
 | 
					 | 
				
			||||||
  # `public_repo` scope enabled
 | 
					 | 
				
			||||||
  # - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token.
 | 
					 | 
				
			||||||
  # - Enter the "encrypted value" below
 | 
					 | 
				
			||||||
  auth_token:
 | 
					 | 
				
			||||||
    secure: oO4/J+hcFXgXcEqEc8gzlQNqLG0IxU78s4EyH+uczGdsyWajb3yipxPR6nXUvmoj
 | 
					 | 
				
			||||||
  provider: GitHub
 | 
					 | 
				
			||||||
  on:
 | 
					 | 
				
			||||||
    RUST_VERSION: stable
 | 
					 | 
				
			||||||
    appveyor_repo_tag: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
cache:
 | 
					 | 
				
			||||||
  - C:\Users\appveyor\.cargo\registry
 | 
					 | 
				
			||||||
  - target
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
notifications:
 | 
					 | 
				
			||||||
  - provider: Email
 | 
					 | 
				
			||||||
    on_build_success: false
 | 
					 | 
				
			||||||
    on_build_failure: false
 | 
					 | 
				
			||||||
    on_build_status_changed: false
 | 
					 | 
				
			||||||
							
								
								
									
										1
									
								
								ci/.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								ci/.gitattributes
									
									
									
									
										vendored
									
									
								
							@@ -1 +0,0 @@
 | 
				
			|||||||
* linguist-vendored
 | 
					 | 
				
			||||||
@@ -1,188 +0,0 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
# Building and packaging for release
 | 
					 | 
				
			||||||
set -ex
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Ensure environment variables exist.
 | 
					 | 
				
			||||||
if [[ -z "$PROJECT_NAME" ]]; then
 | 
					 | 
				
			||||||
    export PROJECT_NAME="bat"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
build() {
 | 
					 | 
				
			||||||
    cargo build --bins --target "$TARGET" --release --verbose
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pack() {
 | 
					 | 
				
			||||||
    local tempdir
 | 
					 | 
				
			||||||
    local out_dir
 | 
					 | 
				
			||||||
    local package_name
 | 
					 | 
				
			||||||
    local gcc_prefix
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
 | 
					 | 
				
			||||||
    out_dir=$(pwd)
 | 
					 | 
				
			||||||
    package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then
 | 
					 | 
				
			||||||
        gcc_prefix="arm-linux-gnueabihf-"
 | 
					 | 
				
			||||||
    elif [[ $TARGET == "aarch64-unknown-linux-gnu" ]]; then
 | 
					 | 
				
			||||||
        gcc_prefix="aarch64-linux-gnu-"
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        gcc_prefix=""
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # create a "staging" directory
 | 
					 | 
				
			||||||
    mkdir "$tempdir/$package_name"
 | 
					 | 
				
			||||||
    mkdir "$tempdir/$package_name/autocomplete"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # copying the main binary
 | 
					 | 
				
			||||||
    cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
 | 
					 | 
				
			||||||
    "${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # manpage, readme and license
 | 
					 | 
				
			||||||
    cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/manual/bat.1 "$tempdir/$package_name/$PROJECT_NAME.1"
 | 
					 | 
				
			||||||
    cp README.md "$tempdir/$package_name"
 | 
					 | 
				
			||||||
    cp LICENSE-MIT "$tempdir/$package_name"
 | 
					 | 
				
			||||||
    cp LICENSE-APACHE "$tempdir/$package_name"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # various autocomplete
 | 
					 | 
				
			||||||
    # TODO: disabled for now, see issue #372
 | 
					 | 
				
			||||||
    # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
 | 
					 | 
				
			||||||
    # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
 | 
					 | 
				
			||||||
    cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/completions/bat.fish "$tempdir/$package_name/autocomplete/$PROJECT_NAME.fish"
 | 
					 | 
				
			||||||
    # cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # archiving
 | 
					 | 
				
			||||||
    pushd "$tempdir"
 | 
					 | 
				
			||||||
    tar czf "$out_dir/$package_name.tar.gz" "$package_name"/*
 | 
					 | 
				
			||||||
    popd
 | 
					 | 
				
			||||||
    rm -r "$tempdir"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
make_deb() {
 | 
					 | 
				
			||||||
    local tempdir
 | 
					 | 
				
			||||||
    local architecture
 | 
					 | 
				
			||||||
    local version
 | 
					 | 
				
			||||||
    local dpkgname
 | 
					 | 
				
			||||||
    local conflictname
 | 
					 | 
				
			||||||
    local gcc_prefix
 | 
					 | 
				
			||||||
    local homepage
 | 
					 | 
				
			||||||
    local maintainer
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    homepage="https://github.com/sharkdp/bat"
 | 
					 | 
				
			||||||
    maintainer="David Peter <mail@david-peter.de>"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case $TARGET in
 | 
					 | 
				
			||||||
        x86_64*)
 | 
					 | 
				
			||||||
            architecture=amd64
 | 
					 | 
				
			||||||
            gcc_prefix=""
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
        i686*)
 | 
					 | 
				
			||||||
            architecture=i386
 | 
					 | 
				
			||||||
            gcc_prefix=""
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
        aarch64*)
 | 
					 | 
				
			||||||
            architecture=arm64
 | 
					 | 
				
			||||||
            gcc_prefix="aarch64-linux-gnu-"
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
        arm*hf) 
 | 
					 | 
				
			||||||
            architecture=armhf  
 | 
					 | 
				
			||||||
            gcc_prefix="arm-linux-gnueabihf-"   
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
        *)
 | 
					 | 
				
			||||||
            echo "make_deb: skipping target '${TARGET}'" >&2
 | 
					 | 
				
			||||||
            return 0
 | 
					 | 
				
			||||||
            ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    version=${TRAVIS_TAG#v}
 | 
					 | 
				
			||||||
    if [[ $TARGET = *musl* ]]; then
 | 
					 | 
				
			||||||
      dpkgname=$PROJECT_NAME-musl
 | 
					 | 
				
			||||||
      conflictname=$PROJECT_NAME
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
      dpkgname=$PROJECT_NAME
 | 
					 | 
				
			||||||
      conflictname=$PROJECT_NAME-musl
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # copy the main binary
 | 
					 | 
				
			||||||
    install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME"
 | 
					 | 
				
			||||||
    "${gcc_prefix}"strip "$tempdir/usr/bin/$PROJECT_NAME"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # manpage
 | 
					 | 
				
			||||||
    install -Dm644 target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/manual/bat.1 "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
 | 
					 | 
				
			||||||
    gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # completions
 | 
					 | 
				
			||||||
    install -Dm644 target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/assets/completions/bat.fish "$tempdir/usr/share/fish/vendor_completions.d/$PROJECT_NAME.fish"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # readme and license
 | 
					 | 
				
			||||||
    install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
 | 
					 | 
				
			||||||
    install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT"
 | 
					 | 
				
			||||||
    install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE"
 | 
					 | 
				
			||||||
    cat > "$tempdir/usr/share/doc/$PROJECT_NAME/copyright" <<EOF
 | 
					 | 
				
			||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 | 
					 | 
				
			||||||
Upstream-Name: $PROJECT_NAME
 | 
					 | 
				
			||||||
Source: $homepage
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Files: *
 | 
					 | 
				
			||||||
Copyright: $maintainer
 | 
					 | 
				
			||||||
License: Apache-2.0 or MIT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
License: Apache-2.0
 | 
					 | 
				
			||||||
 On Debian systems, the complete text of the Apache-2.0 can be found in the
 | 
					 | 
				
			||||||
 file /usr/share/common-licenses/Apache-2.0.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
License: MIT
 | 
					 | 
				
			||||||
 Permission is hereby granted, free of charge, to any
 | 
					 | 
				
			||||||
 person obtaining a copy of this software and associated
 | 
					 | 
				
			||||||
 documentation files (the "Software"), to deal in the
 | 
					 | 
				
			||||||
 Software without restriction, including without
 | 
					 | 
				
			||||||
 limitation the rights to use, copy, modify, merge,
 | 
					 | 
				
			||||||
 publish, distribute, sublicense, and/or sell copies of
 | 
					 | 
				
			||||||
 the Software, and to permit persons to whom the Software
 | 
					 | 
				
			||||||
 is furnished to do so, subject to the following
 | 
					 | 
				
			||||||
 conditions:
 | 
					 | 
				
			||||||
 .
 | 
					 | 
				
			||||||
 The above copyright notice and this permission notice
 | 
					 | 
				
			||||||
 shall be included in all copies or substantial portions
 | 
					 | 
				
			||||||
 of the Software.
 | 
					 | 
				
			||||||
 .
 | 
					 | 
				
			||||||
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
 | 
					 | 
				
			||||||
 ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 | 
					 | 
				
			||||||
 TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 | 
					 | 
				
			||||||
 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
 | 
					 | 
				
			||||||
 SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 | 
					 | 
				
			||||||
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 | 
					 | 
				
			||||||
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
 | 
					 | 
				
			||||||
 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 | 
					 | 
				
			||||||
 DEALINGS IN THE SOFTWARE.
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Control file
 | 
					 | 
				
			||||||
    mkdir "$tempdir/DEBIAN"
 | 
					 | 
				
			||||||
    cat > "$tempdir/DEBIAN/control" <<EOF
 | 
					 | 
				
			||||||
Package: $dpkgname
 | 
					 | 
				
			||||||
Version: $version
 | 
					 | 
				
			||||||
Section: utils
 | 
					 | 
				
			||||||
Priority: optional
 | 
					 | 
				
			||||||
Maintainer: $maintainer
 | 
					 | 
				
			||||||
Homepage: $homepage
 | 
					 | 
				
			||||||
Architecture: $architecture
 | 
					 | 
				
			||||||
Provides: $PROJECT_NAME
 | 
					 | 
				
			||||||
Conflicts: $conflictname
 | 
					 | 
				
			||||||
Description: A cat(1) clone with wings.
 | 
					 | 
				
			||||||
 A cat(1) clone with syntax highlighting and Git integration.
 | 
					 | 
				
			||||||
EOF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    fakeroot dpkg-deb --build "$tempdir" "${dpkgname}_${version}_${architecture}.deb"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
main() {
 | 
					 | 
				
			||||||
    build
 | 
					 | 
				
			||||||
    pack
 | 
					 | 
				
			||||||
    if [[ $TARGET = *linux* ]]; then
 | 
					 | 
				
			||||||
      make_deb
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
main
 | 
					 | 
				
			||||||
@@ -1,28 +0,0 @@
 | 
				
			|||||||
# This script takes care of packaging the build artifacts that will go in the
 | 
					 | 
				
			||||||
# release zipfile
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
$SRC_DIR = $PWD.Path
 | 
					 | 
				
			||||||
$STAGE = [System.Guid]::NewGuid().ToString()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Set-Location $ENV:Temp
 | 
					 | 
				
			||||||
New-Item -Type Directory -Name $STAGE
 | 
					 | 
				
			||||||
Set-Location $STAGE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Copy-Item "$SRC_DIR\target\release\bat.exe" '.\'
 | 
					 | 
				
			||||||
# TODO: disabled for now, see issue #372
 | 
					 | 
				
			||||||
# Copy-Item $SRC_DIR\target\release\build\bat-*\out\_bat.ps1 '.\'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# readme and license
 | 
					 | 
				
			||||||
Copy-Item $SRC_DIR\README.md '.\'
 | 
					 | 
				
			||||||
Copy-Item $SRC_DIR\LICENSE-MIT '.\'
 | 
					 | 
				
			||||||
Copy-Item $SRC_DIR\LICENSE-APACHE '.\'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
7z a "$ZIP" *
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Push-AppveyorArtifact "$ZIP"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Set-Location ..
 | 
					 | 
				
			||||||
Remove-Item $STAGE -Force -Recurse
 | 
					 | 
				
			||||||
Set-Location $SRC_DIR
 | 
					 | 
				
			||||||
@@ -1,38 +0,0 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -ex
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ "$TRAVIS_OS_NAME" != linux ]; then
 | 
					 | 
				
			||||||
    exit 0
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sudo apt-get update
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# needed for musl targets
 | 
					 | 
				
			||||||
sudo apt-get install -y musl-tools
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# needed to build deb packages
 | 
					 | 
				
			||||||
sudo apt-get install -y fakeroot
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# needed for i686 linux gnu target
 | 
					 | 
				
			||||||
if [[ $TARGET == i686-unknown-linux-gnu ]]; then
 | 
					 | 
				
			||||||
    sudo apt-get install -y gcc-multilib
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# needed for cross-compiling for arm
 | 
					 | 
				
			||||||
if [[ $TARGET == arm-unknown-linux-gnueabihf ]]; then
 | 
					 | 
				
			||||||
    sudo apt-get install -y \
 | 
					 | 
				
			||||||
        gcc-4.8-arm-linux-gnueabihf \
 | 
					 | 
				
			||||||
        binutils-arm-linux-gnueabihf \
 | 
					 | 
				
			||||||
        libc6-armhf-cross \
 | 
					 | 
				
			||||||
        libc6-dev-armhf-cross
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# needed for cross-compiling for arm64
 | 
					 | 
				
			||||||
if [[ $TARGET == aarch64-unknown-linux-gnu ]]; then
 | 
					 | 
				
			||||||
    sudo apt-get install -y \
 | 
					 | 
				
			||||||
        gcc-4.8-aarch64-linux-gnu \
 | 
					 | 
				
			||||||
        binutils-aarch64-linux-gnu \
 | 
					 | 
				
			||||||
        gcc-aarch64-linux-gnu \
 | 
					 | 
				
			||||||
        libc6-dev-arm64-cross
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
@@ -1,20 +0,0 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -ex
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Incorporate TARGET env var to the build and test process
 | 
					 | 
				
			||||||
cargo build --target "$TARGET" --verbose
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# We cannot run arm executables on linux
 | 
					 | 
				
			||||||
if [[ $TARGET != arm-unknown-linux-gnueabihf ]] && [[ $TARGET != aarch64-unknown-linux-gnu ]]; then
 | 
					 | 
				
			||||||
    cargo test --target "$TARGET" --verbose
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Run 'bat' on its own source code and the README
 | 
					 | 
				
			||||||
    cargo run --target "$TARGET" -- src/bin/bat/main.rs README.md --paging=never
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Check bat-as-a-library, which has a smaller set of dependencies
 | 
					 | 
				
			||||||
cargo check --target "$TARGET" --verbose --lib --no-default-features --features regex-onig
 | 
					 | 
				
			||||||
cargo check --target "$TARGET" --verbose --lib --no-default-features --features regex-onig,git
 | 
					 | 
				
			||||||
cargo check --target "$TARGET" --verbose --lib --no-default-features --features regex-onig,paging
 | 
					 | 
				
			||||||
cargo check --target "$TARGET" --verbose --lib --no-default-features --features regex-onig,git,paging
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user