From 234507604f70e18b024cdbf2000ffe4bb88af041 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Tue, 23 Jun 2020 19:09:01 +0300 Subject: [PATCH] CI: {.travis.yml,build.sh}: rename (name->project) more unique and descriptive M .travis.yml M build.sh --- .travis.yml | 6 +++--- build.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e509d4..cf99696 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ env: # - rev=nixos-unstable # - NIX_PATH="nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz" # NOTE: Project/binary name - - name='hnix' + - project='hnix' # NOTE: Enable all our tests in cabal - ALL_TESTS='yes' # NOTE: Turn all warn into err with {-Wall,-Werror} @@ -148,9 +148,9 @@ script: # NOTE: Install Cachix client using Nix: - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then nix-env -iA cachix -f https://cachix.org/api/v1/install; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then sudo nix-env -iA cachix -f https://cachix.org/api/v1/install; fi - - cachix use "$name" + - cachix use "$project" # NOTE: If key is set - use Cachix push, else - proceed without it - - if [ ! "$CACHIX_SIGNING_KEY" = "" ]; then cachix push "$name" --watch-store& fi + - if [ ! "$CACHIX_SIGNING_KEY" = "" ]; then cachix push "$project" --watch-store& fi # NOTE: Brush timeout for previous daemon to start # # diff --git a/build.sh b/build.sh index 17f9f16..44ea488 100755 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ rev=${rev:-'nixpkgs-unstable'} # If NIX_PATH not imported - construct it from `rev` NIX_PATH=${NIX_PATH:-"nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz"} export NIX_PATH -name=${name:-'defaultProjectName'} +project=${project:-'defaultProjectName'} # This settings expose most of the Nixpkgs Haskell.lib API: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix @@ -223,14 +223,14 @@ sudo nix-channel --update || true # NOTE: Secrets are not shared to PRs from forks -# NOTE: nix-build | cachix push - uploads binaries, runs&works only in the branches of the main repository, so for PRs - else case runs +# NOTE: nix-build | cachix push - uploads binaries, runs&works only in the branches of the main repository, so for PRs - else case runs if [ ! "$CACHIX_SIGNING_KEY" = "" ] then # NOTE: Build of the inside repo branch - enable push Cachix cache - BUILD_PROJECT | cachix push "$name" + BUILD_PROJECT | cachix push "$project" else