removes old .gitignore, adds new .gitattributes

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2022-03-10 13:24:20 -07:00
parent c82bc00f87
commit 096c936aaf
2 changed files with 25 additions and 8 deletions

View File

@@ -2,13 +2,13 @@ setup() {
load 'helpers'
common_setup
TEMPDIR=$(mktemp -d)
}
@test "project init and update" {
TEMPDIR=$(mktemp -d)
echo "TEMPDIR=$TEMPDIR"
cd "$TEMPDIR"
cd "$TEMPDIR" || exit
"$DAGGER" project init ./ --name "github.com/foo/bar"
test -d ./cue.mod/pkg
test -d ./cue.mod/usr
@@ -16,7 +16,15 @@ setup() {
contents=$(cat ./cue.mod/module.cue)
[ "$contents" == 'module: "github.com/foo/bar"' ]
dagger project update
# ensure old 0.1 style .gitignore is removed
printf "# generated by dagger\ndagger.lock" > .gitignore
"$DAGGER" project update
test -d ./cue.mod/pkg/dagger.io
test -d ./cue.mod/pkg/universe.dagger.io
test -f ./cue.mod/pkg/.gitattributes
run cat ./cue.mod/pkg/.gitattributes
assert_output --partial "generated by dagger"
test ! -f ./cue.mod/pkg/.gitignore
}